Start here
  • InstallationAdd Nelumbo to a shadcn project
  • ThemingBrand accent, neutrals, dynamic color
  • Biology componentsSequences, maps, plates and trees
  • katalyx.bio

    Navigation Rail

    Side navigation for tablets and desktops, with three to seven destinations. The active destination's pill grows out from the center and its icon fills in. Expand it and the labels slide in beside the icons.

    Install

    npx shadcn@latest add @nelumbo/navigation-rail

    Collapsed and expanded

    The menu button toggles between the 80px rail and the 220px expanded rail, where each destination is a compact 40px row. The FAB extends with it. Badges show a count or a dot; settings sit in the footer.

    Inbox

    12 unread conversations

    With descriptions

    Expanded rows are a compact 40px. Give an item a description and its row grows to 56px to fit the second line; it's hidden while collapsed.

    Inbox

    12 unread conversations

    Rail only

    Without the menu button, for layouts that never expand.

    Inbox

    12 unread conversations

    Usage

    Items are buttons with onClick, links with href, or your router's Link with asChild. The active item gets aria-current=page.

    import { NavigationRail, NavigationRailHeader, NavigationRailItem, NavigationRailFooter } from "@/components/ui/navigation-rail"​<NavigationRail aria-label="Main" expanded={open}>  <NavigationRailHeader>    <IconButton icon="menu" label="Menu" onClick={() => setOpen(!open)} />    <Fab icon="edit" label="Compose" extended={open} />  </NavigationRailHeader>  <NavigationRailItem asChild icon="inbox" label="Inbox" badge={12} active={pathname === "/inbox"}>    <Link href="/inbox" />  </NavigationRailItem>  <NavigationRailItem href="/files" icon="folder" label="Files" />  <NavigationRailFooter>    <NavigationRailItem href="/settings" icon="settings" label="Settings" />  </NavigationRailFooter></NavigationRail>

    Props

    PropTypeDefaultNotes
    NavigationRail expandedbooleanfalse80px or 220px wide
    Item icon / labelIconName / stringRequired
    Item activebooleanfalsePill, filled icon, aria-current=page
    Item badgenumber | booleanA count (99+ max), or a dot
    Item descriptionstringSecond line when expanded; row grows from 40 to 56px
    Item href / asChildstring / booleanLink instead of button
    Item disabledbooleanfalse