Components · Actions
Toolbar
StableAdded v0.0.1
A row of buttons and toggles with one tab stop and arrow-key movement, built on Radix.
import { Toolbar } from '@nexub/react';Playground
Props
<Toolbar.Root aria-label="Text formatting">…</Toolbar.Root>Examples
Default
Floating
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| floating | boolean | false | A glass capsule for the control layer above content, e.g. editor or selection actions. |
| placement | 'bottom' | — | With floating: pin it to the bottom centre of the viewport. |
| orientation / loop / dir | Radix Toolbar props | — | Arrow-key direction and wrapping. |
| aria-label | string | — | Name the toolbar, e.g. "Text formatting". |
| Toolbar.Button | compound | — | An action button. |
| Toolbar.ToggleGroup / ToggleItem | compound | — | A set of toggles (type="single" | "multiple", value). Icon-only items need aria-label. |
| Toolbar.Separator | compound | — | A divider between groups. |
Accessibility
ARIA roles
toolbar
Keyboard
- Tab
Moves into and out of the toolbar (one tab stop).
- Arrow Left / Right
Moves between controls.
- Enter / Space
Activates a button or toggles an item.
On iOS & Android
Web only
Toolbar has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.