Skip to content
caliper ui pro docs

Morph nav

A navigation bar that morphs between collapsed and expanded states.

Pro

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

MorphNav

3 props
PropTypeDefault
labelstring"Main"
items *readonly MorphNavItem[]—
classNamestring—

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.md

The index of every part is at /llms.txt.

More in Morphing controls