Menubar

Menus & Navigation · Guide 15 of 46

Open the live Menubar demo →

Purpose

Desktop-style horizontal menu bar.

Import

<script lang="ts">
	import { Menubar } from 'bits-ui';
</script>

The registry names Menubar as this guide’s namespace. Copy the exact root and part composition from the live demo rather than guessing part names.

Usage checklist

  • Use links for navigation and buttons for actions.
  • Preserve arrow-key, typeahead, and focus behavior provided by the primitive.
  • Test active, disabled, long-label, pointer, and keyboard states.

Secondary reference

After using the local example, consult the upstream Bits UI reference for exhaustive API details.

Continue