Tile UI · SolidJS

CSR · SSR · SSG

Menubar

A desktop-style SolidJS menubar with roving focus and menu switching.

Arrow Left/Right switches open menus; sidebar shown; system theme.

import { createSignal } from 'solid-js';
import {
	Menubar,
	MenubarCheckboxItem,
	MenubarContent,
	MenubarItem,

Use Menubar for desktop-style menus whose roving triggers and open panels switch with arrow keys.

Registry install

pnpm dlx shadcn@latest add @tile-ui/menubar

Package usage

import { Menubar } from '@tile-ui/solid';

<Menubar>
	<MenubarMenu value="file"><MenubarTrigger>File</MenubarTrigger><MenubarContent><MenubarItem>New</MenubarItem></MenubarContent></MenubarMenu>
	<MenubarMenu value="view"><MenubarTrigger>View</MenubarTrigger><MenubarContent><MenubarCheckboxItem checked>Sidebar</MenubarCheckboxItem></MenubarContent></MenubarMenu>
</Menubar>

Highlights

  • Arrow-key switching between menus
  • Checkbox, radio, and nested submenu branches
  • Roving trigger tabstops from the menu Foundation

Foundation behavior

This Solid implementation uses native nested primitives and does not expose asChild. Controlled state uses Solid accessors and explicit callbacks such as onOpenChange, onValueChange, or onSearchChange where the family supports them.

Portal content is omitted from the server response and mounted during hydration into the resolved document or nested portal scope. Closed and default-open roots keep deterministic trigger IDs and ARIA relationships without a hydration mismatch.

Keyboard behavior follows the shared Foundation: focus and Tab order, Escape dismissal, arrow-key movement, typeahead, submenu branches, and trigger restoration are applied according to the component role.

Registry dependencies

Item Purpose
menubar Component source and module styles
core Framework-agnostic logic helpers
dropdown-menu Registry component dependency
styles Shared SCSS tokens and globals

API reference

Prop Type Default
value string
defaultValue string
onValueChange (value: string | undefined) => void
Prop Type Default
value string
Prop Type Default
disabled boolean
Prop Type Default
side 'top' | 'right' | 'bottom' | 'left'
align 'start' | 'center' | 'end'
sideOffset number
alignOffset number
Prop Type Default
inset boolean
variant 'default' | 'destructive'
disabled boolean
onSelect (event: Event) => void
Prop Type Default
checked boolean
defaultChecked boolean
onCheckedChange (checked: boolean) => void
disabled boolean
Prop Type Default
value string
defaultValue string
onValueChange (value: string) => void
Prop Type Default
value string
disabled boolean
Prop Type Default
inset boolean
Prop Type Default
open boolean
defaultOpen boolean
onOpenChange (open: boolean) => void
Prop Type Default
inset boolean
disabled boolean

No custom props.

No custom props.

No custom props.

No custom props.

No custom props.