Navbar, menu panels


Install
npx shadcn add https://ui.klarhimmel.com/r/navbar-menu.jsonDetailsAbout, usage, props and more
Brand, up to four link groups that open a panel of described links, and one call to action. Panels become sections of the mobile menu.
Import
Import
- navigation/menu
- header/menu
- Category
- The bar at the top of every page: brand, links, one action. New project? Set it up once: /get-started/installation.
Notes
When to use it
A header for sites with enough pages that links need grouping, where each group opens a panel of links with a short description. For a flat list of a few links, use navbar-simple instead.
Writing for it
- Each group label holds 24 characters and the block takes one to four groups. The label is the only thing visible until the panel opens, so name it by the reader's task. - Every link in a panel has a label (40) and a description (100). Write the description as what the reader gets on that page, not a repeat of the label. - A group takes one to six links, but the panel lays them out in two or three columns on wide containers, so aim for an even count.
Watch out for
There is no plain link slot: every top-level entry is a group that must hold at least one link, so a single page such as Pricing has to be tucked into a group or left out.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
brand | string | 'Brand name' | Text, up to 40 characters. |
wordmark | Media | - | Optional; empty is not rendered. |
brandHref | string | - | Text, up to 300 characters. Optional; empty is not rendered. |
groups | { label, links }[] | 3 items | List of 1 to 4. Each item: label, links. |
cta | Link | {…} | See the type. |