Navigation Menu
ProNewA site header menu whose panels share one surface: it resizes between triggers, slides panels in from the side you moved toward, and points an arrow at the open trigger.
Installation
pnpm dlx shadcn@latest add @viewport/navigation-menu
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| title* | string | — |
| description | string | — |
| icon | React.ReactNode | — |
Accessibility
- A navigation landmark with a list of triggers and links.
- Opens on hover after a short delay and on press; Escape closes it.
- Arrow keys move between triggers and into the open panel.
- Panels switch without sliding, and the surface without resizing, under reduced motion.