Skip to content

    Browse components

    Flex Navbar

    Icon navbar whose items spring open to reveal a tinted label on hover or focus while their neighbours flex aside.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/flex-navbar

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/flex-navbar.json

    Usage

    import { FlexNavbar } from "@/components/ui/flex-navbar";
    
    <FlexNavbar
      items={[
        { label: "Home", icon: <House />, color: "#a78bfa" },
        { label: "Explore", icon: <Compass />, color: "#22d3ee" },
        { label: "Profile", icon: <User />, color: "#f472b6" },
      ]}
    />

    Props

    PropTypeDefaultDescription
    itemsReactNode—Array of { label, icon, color?, onClick? }.
    accentstring"#a78bfa"Accent for items without their own color.
    showActiveLabelbooleantrueKeep the active item open when nothing is hovered.
    bouncenumber0.35Spring bounce.
    iconSizenumber20Icon size in px.
    defaultActivenumber0Index of the initially active item.
    onChangeReactNode—Called with the new active index.
    classNamestring—Extra classes for the root element.