Toggle Sidebar B
AppearanceLight & dark mode D

Card Nav

Expandable navigation bar with card panels revealing nested links.

Default

Open the menu from the hamburger. Pick a theme and an easing in the controls underneath.

Dark previewReplay previewOpen in new tab

Customize

Example
Animation Ease

API Reference

CardNav

PropTypeDefaultDescription
logostring-URL for the logo image.
logoAltstring'Logo'Alt text for the logo image.
itemsCardNavItem[]-Array of navigation items with label, bgColor, textColor, and links. Only the first three are shown.
easestring'power3.out'GSAP easing function for animations.
baseColorstring'#fff'Background color for the navigation container.
menuColorstringundefinedColor for the hamburger menu lines.
buttonBgColorstring'#111'Background color for the CTA button.
buttonTextColorstring'white'Text color for the CTA button.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
TabMoves focus to the hamburger, then to the call to action.
Enter + SpaceOpens or closes the menu from the hamburger.
  • The hamburger is a button role with aria-expanded, and the card panel is aria-hidden while closed.