# Menubar

A persistent row of menus, like a desktop app. The open tab slides between triggers, and holding Alt shows every access key.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/menubar
```

## Usage

```tsx
import { Menubar } from '@/components/fetaui/menubar'

export function Example() {
  return (
    <Menubar
      label="Editor"
      menus={[
        { label: 'File', entries: [{ label: 'Save', shortcut: ['⌘', 'S'], onSelect: save }] },
        { label: 'View', entries: [{ kind: 'checkbox', label: 'Full URLs' }] },
      ]}
    />
  )
}
```

## API

| Prop | Type | Default |
|---|---|---|
| menus | MenubarMenu[] | required |
| label | string | required |
| defaultOpen | string |  |
| animated | boolean | true |

## When to use

- For desktop style apps with many commands: editors, dashboards and admin tools.
- Keep top level names to one word, and five to seven menus.

## When not to use

- For a single menu: use Dropdown Menu.
- For site navigation: use Navigation Menu.

## Accessibility

- Uses the menubar, menu and menuitem roles with checkbox and radio variants.
- Triggers use one tab stop and arrow keys.
- Disabled rows are announced in place but skipped by keys.
- Shortcuts are listed, and every command also works from the menu.

## Motion

- The open tab lifts onto surface and slides 200 ms on a spring between triggers.
- The menu drops in over 160 ms. Moving to another trigger swaps the content at once, so scanning stays fast.
- Access keys fade in over 120 ms.
- With reduced motion, the tab jumps and menus appear in place.
