Morph nav
A navigation bar that morphs between collapsed and expanded states.
A small studio building interface parts people can own.
When to use
- A header that should shrink while scrolling.
When not to use
- The site has simple navigation.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/morph-nav
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
Keyboard
- Escape
- Closes or cancels, then returns focus to where it came from.
Accessibility
It exposes group semantics, with aria-label, aria-expanded, aria-controls and aria-hidden kept in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/morph-nav.mdThe index of every part is at /llms.txt.