Unfold Nav
A frosted bar with a menu button, a centered logo and a call to action that springs open into cards of links, arriving one after another.
pixikit.com/docs/components/unfold-nav
Customize
Theme
Surface
Open on
Card effect
Stagger0.12
Bounce0.20
Speed1.00
Card height176px
Max width800px
Accent color
Menu label
Intro
Default open
Props
27| Name | Type | Default | Description |
|---|---|---|---|
items | UnfoldNavItem[] | DEFAULT_ITEMS | The cards in the menu: `{ label, description, bgColor, textColor, links: [{ label, href, ariaLabel }] }`. |
logo | string | ReactNode | DEFAULT_LOGO | Image URL or element shown in the middle of the bar. |
logoAlt | string | "Logo" | Accessible label for the logo link. |
logoHref | string | "#" | Where the logo links to. |
ctaLabel | string | "Get started" | Label of the button on the right of the bar. Leave it empty for no button. On narrow widths it moves to the bottom of the menu. |
ctaHref | string | None | Where the button links to. Without it the button is a plain button. |
onCtaClick | (event: ReactMouseEvent<HTMLElement>) => void | None | Called when the button is clicked. |
theme | "dark" | "light" | "dark" | Color scheme of the bar, cards and button. |
surface | "glass" | "solid" | "glass" | Frosted glass that blurs what is behind the bar, or an opaque fill. |
openOn | "click" | "hover" | "click" | Opens the menu from the button, or as soon as the pointer moves over the bar. |
cardEffect | "rise" | "unfold" | "fade" | "rise" | How the cards arrive: rising into place, folding down from the bar, or fading in from a soft blur. |
stagger | number | 0.12 | How far each card trails the one before it, from 0 to 0.3. |
bounce | number | 0.2 | How much the menu overshoots as it opens, from 0 to 1. |
speed | number | 1 | Speed of the open and close animation. |
cardHeight | number | 176 | Minimum height of the cards in px. |
maxWidth | number | 800 | Maximum width of the bar in px. |
accentColor | string | None | Color of the button. Its label picks black or white for contrast. |
menuLabel | boolean | true | Shows Menu and Close next to the menu icon, rolling between them. |
intro | boolean | true | Unrolls the bar from its center on mount. |
defaultOpen | boolean | false | Starts with the menu open. |
open | boolean | None | Controls the menu from outside. Pair it with onOpenChange. |
onOpenChange | (open: boolean) => void | None | Called when the menu opens or closes. |
linkComponent | ElementType | "a" | Renders the links, so you can pass your router's link. It receives href, className and children. |
onLinkClick | (link: UnfoldNavLink, item: UnfoldNavItem, event: ReactMouseEvent<HTMLElement>) => void | None | Called when a link is clicked. The menu closes afterwards. |
ariaLabel | string | "Main" | Accessible name of the nav landmark. |
className | string | "" | |
style | CSSProperties | None |