Skip to content

Rail shell

A top bar with context pickers, an icon rail and an optional page column.

In use

A full-page layout, so it is shown in its own screen: Bookings. Open it full screen there; below 1024px the page column becomes a row, below 640px the rail becomes a tab bar.

Code
<RailShell
  brand={<Logo />}
  context={<><VenuePicker /> / <AppPicker /></>}
  actions={<Avatar name="Ada Lovelace" />}
  rail={[
    { label: "Home", href: "/", icon: <House /> },
    { label: "Bookings", href: "/bookings", icon: <CalendarCheck />, current: true },
  ]}
  railEnd={[{ label: "Settings", href: "/settings", icon: <Settings /> }]}
  subnav={{ title: "Bookings", items: [{ label: "Today", href: "/bookings", current: true }, { label: "Waitlist", href: "/bookings/waitlist" }] }}
  renderLink={(p) => <NextLink {...p} />}
>
  {children}
</RailShell>