Skip to content
PixiKit

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
NameTypeDefaultDescription
itemsUnfoldNavItem[]DEFAULT_ITEMSThe cards in the menu: `{ label, description, bgColor, textColor, links: [{ label, href, ariaLabel }] }`.
logostring | ReactNodeDEFAULT_LOGOImage URL or element shown in the middle of the bar.
logoAltstring"Logo"Accessible label for the logo link.
logoHrefstring"#"Where the logo links to.
ctaLabelstring"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.
ctaHrefstringNoneWhere the button links to. Without it the button is a plain button.
onCtaClick(event: ReactMouseEvent<HTMLElement>) => voidNoneCalled 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.
staggernumber0.12How far each card trails the one before it, from 0 to 0.3.
bouncenumber0.2How much the menu overshoots as it opens, from 0 to 1.
speednumber1Speed of the open and close animation.
cardHeightnumber176Minimum height of the cards in px.
maxWidthnumber800Maximum width of the bar in px.
accentColorstringNoneColor of the button. Its label picks black or white for contrast.
menuLabelbooleantrueShows Menu and Close next to the menu icon, rolling between them.
introbooleantrueUnrolls the bar from its center on mount.
defaultOpenbooleanfalseStarts with the menu open.
openbooleanNoneControls the menu from outside. Pair it with onOpenChange.
onOpenChange(open: boolean) => voidNoneCalled when the menu opens or closes.
linkComponentElementType"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>) => voidNoneCalled when a link is clicked. The menu closes afterwards.
ariaLabelstring"Main"Accessible name of the nav landmark.
classNamestring""
styleCSSPropertiesNone

More navigation components in Pro

View all

Related