Velora UI

Navbar Menu

Hover-driven menu whose pill and panel morph between items.

  • 1.6 KB gzipped
  • Deps: motion/react
  • Reduced-motion safe
  • Base UI & Radix compatible
Open in v0

Preview

Installation

pnpm dlx shadcn@latest add https://velora.colorlib.com/r/navbar-menu.json

Adds components/velora/navbar-menu.tsx, installs motion.

Props

NavbarMenu

PropTypeDefault
children*React.ReactNode—
classNamestring—

MenuItem

PropTypeDefault
label*string—
href

Renders the item as a link; ignored when the item has a panel

string—
childrenReact.ReactNode—
classNamestring—

Accessibility

Reduced motion
The highlight pill jumps between items and the panel appears and disappears instantly, with no fade, rise or scale.
Keyboard
Tabbing to an item with a panel opens it, and Tab continues into the panel. Escape closes it and returns focus to the item, focus leaving the menu closes it, and Enter or Space reopens it. Items with `href` are ordinary links.
Screen readers
A <nav> of buttons and links; only items with a panel carry aria-expanded, plus aria-controls while open.