A visually persistent menu common in desktop applications that provides quick access to a consistent set of commands.
Philosophy
Menubars bring desktop-application navigation patterns to the web. The keyboard model (arrow keys between menus, type-ahead navigation, submenu traversal) follows established platform conventions and is powered by @gentleduck/primitives/menubar.
Set dir="rtl" on Menubar for a local override, or set DirectionProvider once at app/root level for global direction.
Motion
Alpha: Motion Compositions
Motion components work standalone, but some compositions may behave unexpectedly — this is still under active development. If you find a broken composition, please file an issue.
Use MotionMenubarContent for a spring-powered enter animation with blur powered by motion. Exit uses the primitive's built-in CSS animation.
Requires the motion package. Use MotionMenubarContent instead of MenubarContent. All other sub-components stay the same.
API Reference
Components in this file wrap @gentleduck/primitives/menubar.
Menubar
Prop
Type
Default
Description
value
string
''
Controlled currently-open menu value
defaultValue
string
''
Initial open menu value for uncontrolled usage
onValueChange
(value: string) => void
-
Callback when open menu value changes
loop
boolean
true
Loops roving focus across triggers
dir
'ltr' | 'rtl'
-
Text direction. Resolved by primitives useDirection (dir prop -> DirectionProvider -> 'ltr').
Additional props inherited from MenubarPrimitive.SubContent
MotionMenubarContent
Same props as MenubarContent. Adds spring scaleIn+blur enter animation via motion. Exit uses the primitive's CSS animation. Requires the motion package.