Navigation Menu

Site navbar with a logo slot, plain links and mega-menu panels: a hover pill glides between items, the dropdown viewport morphs its size to each panel while content slides in the direction you move, panels open on hover intent or click/Enter, close on Escape or outside click, support arrow-key navigation, and collapse below md into a hamburger sheet with accordion sections.

Preview

Navigation Menu preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/navigation-menu
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

items
NavigationMenuItem[]
—
logo?
ReactNode

Brand slot on the left of the bar.

—
actions?
ReactNode

Right-hand slot (CTA buttons); hidden below `md`, repeated in the sheet.

—
value?
string

Open panel id, `""` when closed.

—
defaultValue?
string
onValueChange?
((value: string) => void)
—
openDelay?
number

Hover-intent delay before the first panel opens (ms).

150
closeDelay?
number

Grace period after the pointer leaves before closing (ms).

250
aria-label?
string
Main
className?
string
—

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.

Updated