Menubar
Menubar component, a row of menus like a desktop app with shortcuts, checked items and full keyboard navigation.
How to use it
Run npx @blossomui/react add menubar, or copy src/components/UI/Menubar/Menubar.tsx into your React project and import it.
import { Menubar } from './components/ui/Menubar'
Props
MenubarItem
| Prop | Type | Description |
|---|
| id (required) | string | |
| label (required) | string | |
| icon | ReactNode | |
| shortcut | string | Keyboard shortcut shown on the right, for example "Ctrl+S". It is only a hint: you handle the key yourself. |
| onSelect | () => void | |
| checked | boolean | Shows a check before the item. Use it for options that are on or off. |
| danger | boolean | |
| disabled | boolean | |
| separator | boolean | Draws a line above this item. |
MenubarMenu
| Prop | Type | Description |
|---|
| id (required) | string | |
| label (required) | string | |
| items (required) | MenubarItem[] | |
MenubarProps
| Prop | Type | Description |
|---|
| menus (required) | MenubarMenu[] | |
| color | string | Accent color of the highlighted item: any CSS color. Without it the component uses `--blossom-accent`. |
| label | string | Accessible name of the bar. |
| className | string | |