Menubar
Horizontal menu bar with dropdown menus
Start Here
Start from the smallest working snippet, then move to interactive examples and the full API contract below.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
<script lang="ts">
import '@dryui/ui/themes/default.css';
import '@dryui/ui/themes/dark.css';
import { Menubar } from '@dryui/ui';
</script>
<Menubar.Root>
<Menubar.Menu>...</Menubar.Menu>
<Menubar.Trigger>...</Menubar.Trigger>
<Menubar.Content>...</Menubar.Content>
<Menubar.Item>...</Menubar.Item>
<Menubar.Separator>...</Menubar.Separator>
<Menubar.Label>...</Menubar.Label>
</Menubar.Root>Import options
Root package
import { Menubar } from '@dryui/ui'Per-component subpath
import { Menubar } from '@dryui/ui/menubar'Customize
Use the interactive examples to see common variants, states, and composition patterns before building your own.
Default
<script lang="ts">
import { Menubar } from '@dryui/ui';
</script>
<Menubar.Root>
<Menubar.Menu>
<Menubar.Trigger>File</Menubar.Trigger>
<Menubar.Content>
<Menubar.Item>New File</Menubar.Item>
<Menubar.Item>Open</Menubar.Item>
<Menubar.Separator />
<Menubar.Item>Save</Menubar.Item>
<Menubar.Item>Save As…</Menubar.Item>
</Menubar.Content>
</Menubar.Menu>
<Menubar.Menu>
<Menubar.Trigger>Edit</Menubar.Trigger>
<Menubar.Content>
<Menubar.Item>Undo</Menubar.Item>
<Menubar.Item>Redo</Menubar.Item>
<Menubar.Separator />
<Menubar.Item>Cut</Menubar.Item>
<Menubar.Item>Copy</Menubar.Item>
<Menubar.Item>Paste</Menubar.Item>
</Menubar.Content>
</Menubar.Menu>
<Menubar.Menu>
<Menubar.Trigger>View</Menubar.Trigger>
<Menubar.Content>
<Menubar.Item>Zoom In</Menubar.Item>
<Menubar.Item>Zoom Out</Menubar.Item>
<Menubar.Separator />
<Menubar.Item>Full Screen</Menubar.Item>
</Menubar.Content>
</Menubar.Menu>
</Menubar.Root>Structure
Compound components always start with Menubar.Root. Use this structure block to understand required wrappers before you wire state or styling.
Menubar.Root Menubar.Menu Menubar.Trigger Menubar.Content Menubar.Item Menubar.Separator Menubar.Label
Compose
The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.
Compound component. Start with Menubar.Root, then add only the parts you need.
Menubar.Root
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
children | Snippet | — | ✓ | — |
Forwards <div> attributes via rest props. Common examples: id, style, role.
Menubar.Menu
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
children | Snippet | — | ✓ | — |
Also accepts standard HTML attributes (class, style, id, etc.)
Menubar.Trigger
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
children | Snippet | — | ✓ | — |
Forwards <button> attributes via rest props. Common examples: type, disabled, name.
Menubar.Content
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
placement | bottombottom-startbottom-end | — | — | — |
offset | number | — | — | — |
children | Snippet | — | ✓ | — |
Forwards <div> attributes via rest props. Common examples: id, style, role.
Menubar.Item
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
disabled | boolean | — | — | — |
onSelect | () => void | — | — | — |
children | Snippet | — | ✓ | — |
Forwards <div> attributes via rest props. Common examples: id, style, role.
Menubar.Separator
| Prop | Type | Default | Required | Bindable |
|---|
Forwards <div> attributes via rest props. Common examples: id, style, role.
Menubar.Label
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
children | Snippet | — | ✓ | — |
Forwards <div> attributes via rest props. Common examples: id, style, role.