Theme

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.

svelte
<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

ts
import { Menubar } from '@dryui/ui'

Per-component subpath

ts
import { Menubar } from '@dryui/ui/menubar'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Default

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
Menubar.Root Menubar.MenuMenubar.TriggerMenubar.ContentMenubar.ItemMenubar.SeparatorMenubar.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.MenuMenubar.TriggerMenubar.ContentMenubar.ItemMenubar.SeparatorMenubar.Label

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.