base-ui-svelte

Menubar

A horizontal menu bar of menus.

View as Markdown

API Reference

Props mirror Base UI React where applicable, adapted for Svelte 5. Native HTML attributes for the rendered element are also accepted unless noted.

The container for menus.

Props

orientation MenubarOrientation 'horizontal'
Description

The orientation of the menubar.

Type
MenubarOrientation
Default
'horizontal'
openOnHover boolean —
Description

Force open-on-hover even when no menu is open. When omitted, follows open menu state.

Type
boolean | undefined
closeDelay number 150
Description

Delay before closing after pointer leaves (ms).

Type
number
Default
150
modal boolean true
Name
modal
Description

Whether menus in this menubar lock document scroll when open.

Type
boolean
Default
true
children snippet —
Description

Content rendered inside the part.

Type
Snippet

Data attributes

AttributeDescription
data-orientationDetermines the orientation of the menubar.