Skip to content

NavigationMenu ​

Horizontal nav with panels

A site's top navigation, where some entries open a panel of links. It's navigation, not commands: for an app's File / Edit menus use Menubar; on phones, BottomTabs or a Drawer.

Basic
  • Entries with items open a panel: on hover with a mouse, on tap on touch screens, and with Enter, Space or ↓ from the keyboard (focus moves into the panel). ← / → move between entries.
  • Esc closes the panel and returns focus to its entry; tabbing out of it closes it too.
  • active marks the current section (aria-current="page"); #panel replaces the panel's links with your own layout.

Usage ​

ts
import { BlessNavigationMenu } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
items*BlessNavMenuItem[]—
labelstring"Main"

Events

NamePayloadDescription
select[item: { label: string; href: string; }, e: MouseEvent]

Slots

NameScopeDescription
panel{ item: BlessNavMenuItem; }

Released under the MIT License. Character names and artwork belong to their owners.