Skip to content

    Browse components

    Motion Navbar

    Site navbar with a hover pill that glides between links and a single dropdown that morphs its size and position between menus.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/motion-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/motion-navbar.json

    Usage

    import { MotionNavbar } from "@/components/ui/motion-navbar";
    
    <MotionNavbar
      logo={<Logo />}
      items={[
        { label: "Products", content: <ProductsMenu /> },
        { label: "Resources", content: <ResourcesMenu /> },
        { label: "Pricing", href: "/pricing" },
      ]}
      actions={<Button>Get started</Button>}
    />

    Props

    PropTypeDefaultDescription
    itemsReactNode—Array of { label, href?, content? }; items with content open the dropdown.
    logoReactNode—Left slot, usually the brand.
    actionsReactNode—Right slot, usually buttons.
    bouncenumber0.15Spring bounce of the glide and morph.
    durationnumber0.4Seconds for the glide and morph.
    closeDelaynumber150Ms before the dropdown closes after leaving.
    classNamestring—Extra classes for the root element.