GitHub

Menubar

Horizontal menu bar with dropdown menus

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { Menubar } from "@corew500/ui/menubar"

<Menubar>Content</Menubar>

API Reference

Props

PropTypeDefaultDescription
modalenumtrueWhether the menubar is modal.
disabledenumfalseWhether the whole menubar is disabled.
orientationenum'horizontal'The orientation of the menubar.
loopFocusenumtrueWhether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys.
styleenumStyle applied to the element, or a function that returns a style object based on the component’s state.
classNameenumCSS class applied to the element, or a function that returns a class based on the component’s state.
renderenumAllows you to replace the component’s HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.

Accessibility

Keyboard Navigation

  • Keyboard navigation: Arrow keys between triggers, Enter/Space to open
  • Escape closes menu, Tab moves focus out

Screen Readers

  • - Uses menubar role with proper ARIA attributes
  • Menu items announced with role and state

Localization

Translatable Content

  • - Pass translated strings to MenubarTrigger, MenubarItem, MenubarLabel

Additional

  • MenubarShortcut should display localized keyboard shortcuts

Related

Related Components