Fluid NavbarFluid Navbar
An expanding navigation bar with image-backed dropdown panels, responsive sizing, and hover or click interactions.
Amines UI · Blocks
Navigation that feels alive
A glass pill that expands toward your cursor, previews each section with imagery, and glides back to rest.
Get startedView docs
Installation
- 1
Install the component:
npx shadcn@latest add https://ui.amines.fun/registry/fluid-navbar.json - 2
Usage:
jsxapp/page.jsx
1<FluidNavbar2 position="fixed"3 offset={24}4 logo={<span className="text-sm font-semibold text-white">Acme</span>}5 menu={{6 Products: [7 {8 label: "Analytics",9 href: "/products/analytics",10 description: "Real-time dashboards and reporting",11 image: "/bg.jpg",12 },13 ],14 Pricing: "/pricing",15 }}16 cta={{ label: "Get started", href: "/signup" }}17 expandedWidth={720}18 backdrop19/>
Props
| Prop | Type | Default | Description | Required |
|---|---|---|---|---|
| menu | Record<string, string | Array<string | { label: string; href?: string; description?: string; image?: string; imageAlt?: string; tag?: string; external?: boolean }>> | - | Simple navigation configuration. A string value creates a direct link; an array creates a dropdown whose links can include descriptions, images, tags, and custom destinations. | No |
| items | Array<{ id?: string; label: string; href?: string; heading?: string; image?: string; imageAlt?: string; caption?: string; footer?: { label: string; href: string }; links?: Array<{ label: string; href: string; description?: string; image?: string; imageAlt?: string; tag?: string; external?: boolean }> }> | - | Advanced full-control navigation data. When provided, these items are used instead of menu. | No |
| cta | false | string | { label: string; href?: string; onClick?: () => void; icon?: ReactNode } | Contact link to /contact when omitted | CTA configuration. A string sets its destination; false hides the CTA; an object supports a custom label, destination, callback, and icon. | No |
| ctaLabel | string | "Contact" | Label used for string or default CTA values. | No |
| logo | ReactNode | - | Optional content displayed at the start of the navigation bar. | No |
| trigger | "hover" | "click" | "hover" | How dropdown panels are opened. | No |
| openDelay | number | 0 | Hover delay before opening a dropdown, in milliseconds. | No |
| closeDelay | number | 180 | Hover delay before closing a dropdown, in milliseconds. | No |
| activeId | string | null | - | Controlled active navigation item ID. Pair with onActiveChange. | No |
| defaultActiveId | string | null | null | Initially active navigation item ID when the active state is uncontrolled. | No |
| onActiveChange | (activeId: string | null) => void | - | Called when the active navigation item changes. | No |
| closeOnEscape | boolean | true | Close an open dropdown when Escape is pressed. | No |
| closeOnOutsideClick | boolean | true | Close an open dropdown when the user clicks outside the navigation. | No |
| closeOnNavigate | boolean | true | Close an open dropdown after a panel link is activated. | No |
| position | "fixed" | "absolute" | "static" | "fixed" | Positioning mode for the navigation bar. | No |
| offset | number | 24 | Distance from the top edge in pixels for fixed and absolute positioning. | No |
| barHeight | number | 56 | Collapsed navigation bar height in pixels. | No |
| expandedWidth | number | 760 | Expanded navigation panel width in pixels, capped to the viewport width. | No |
| panelHeight | "auto" | number | "auto" | Dropdown panel height. A number forces a pixel height and enables internal scrolling when needed. | No |
| minPanelHeight | number | 300 | Minimum dropdown panel height in pixels. | No |
| maxPanelHeight | number | - | Maximum dropdown panel height in pixels. Defaults to the available viewport height. | No |
| zIndex | number | 50 | Stacking order for the navigation and its backdrop. | No |
| imageProps | Partial<NextImageProps> | {} | Additional props forwarded to next/image for panel preview images. | No |
| imageSizes | string | "380px" | Sizes hint passed to next/image for panel preview images. | No |
| preloadLimit | number | 16 | Maximum number of distinct panel preview images kept mounted for quick switching. | No |
| transition | FramerMotionTransition | - | Spring or duration transition settings for the navigation layout. | No |
| stagger | number | 0.045 | Stagger interval in seconds for dropdown content entrance. | No |
| animateOnMount | boolean | true | Animate the navigation bar into place when it first mounts. | No |
| magneticCta | boolean | true | Enable the pointer-following magnetic effect on the CTA. | No |
| imageParallax | boolean | true | Enable pointer-driven parallax on dropdown preview images. | No |
| showIndices | boolean | false | Show numbered indices beside dropdown links. | No |
| backdrop | boolean | false | Show a dimmed page backdrop while a dropdown is open. | No |
| showCloseButton | boolean | true | Show the dropdown panel close button. | No |
| closeButtonPlacement | "center" | "right" | "center" | Position of the dropdown close button. | No |
| closeButtonSize | number | 48 | Close button size in pixels. | No |
| closeButtonOffset | number | -8 | Pixel offset used to position the dropdown close button. | No |
| theme | { background?: string; foreground?: string; muted?: string; hover?: string; border?: string; ctaBackground?: string; ctaForeground?: string; closeBackground?: string; shadow?: string } | - | Override navigation, panel, CTA, close button, and shadow colors. | No |
| className | string | - | Additional class names applied to the outer positioning container. | No |
| classNames | Partial<Record<"container" | "bar" | "item" | "panel" | "heading" | "link" | "linkLabel" | "linkDescription" | "imageWrap" | "image" | "caption" | "footer" | "cta" | "closeButton", string>> | {} | Optional class names for the navigation container, bar, links, dropdown content, images, footer, CTA, and close button. | No |
| renderPanel | ({ item, close }: { item: NavigationItem; close: () => void }) => ReactNode | - | Custom dropdown panel renderer. Receives the active item and a callback to close the panel. | No |
| ariaLabel | string | "Main navigation" | Accessible name for the navigation landmark. | No |