‮Skip to content‬
uiify

Toolbar

‮Group of controls with one tab stop and arrow-key navigation.‬

‮Browsers‬
Chrome 123+Firefox 121+Safari 17.5+
‮Tier‬
1
‮Bundle compressed‬
2.04 kB
‮Forced layout budget‬
0 ms
‮Axe budget‬
0
‮SSR compatible‬
‮Yes‬
‮Published contract‬
‮Test harness‬

‮Playground‬

Toolbar

‮Default‬

‮API‬

Toolbar.Root

‮Prop‬‮Type‬‮Default‬‮Description‬
dir"ltr" | "rtl"—‮Writing direction, which flips what the left and right arrow keys do.‬
loopbooleantrue‮Whether arrow-key navigation wraps around at the first and last item.‬
orientation"horizontal" | "vertical" | "both""horizontal"‮Which arrow keys move focus between items, and the data-orientation value.‬

Toolbar.Button

‮Prop‬‮Type‬‮Default‬‮Description‬
selectedboolean—‮Toggle state of the button: sets aria-pressed and, when true, data-selected and the primary fill.‬
childrenReactNode—‮Content of the button.‬
classNamestring—‮Class applied to the button element.‬
disabledbooleanfalse‮Disables the button and takes it out of the roving-focus order.‬

Toolbar.Link

Toolbar.Separator

‮Prop‬‮Type‬‮Default‬‮Description‬
classNamestring—‮Class applied to the <hr> element.‬
orientation"horizontal" | "vertical""vertical"‮Sets aria-orientation and data-orientation on the separator.‬

Toolbar.ToggleGroup

‮Prop‬‮Type‬‮Default‬‮Description‬
id*string—‮Base for the deterministic ids and the shared input group name.‬
type"single" | "multiple""single"‮Whether one or several toggles may be pressed, choosing radio or checkbox inputs.‬
items*readonly ToggleGroupItem[]—‮Each item is { value, label, disabled? }.‬
defaultValuestring | readonly string[] | undefined—‮Pressed on first render. Uncontrolled, so it survives with no JavaScript.‬
orientation"horizontal" | "vertical""horizontal"‮Direction the toggles are laid out in.‬
classNamestring—‮Class applied to the group root.‬

‮Keyboard‬

‮Key‬‮Action‬
Tab‮Move focus to/from the control‬
Enter / Space‮Activate when focused (button-like controls)‬

‮Accessibility‬

‮Uses semantic HTML where possible. Inspect rendered markup in the playground — ARIA is added only when native elements are insufficient.‬

‮Styling hooks‬

data-disabled