Toolbar
Groups related controls with roving arrow-key focus (role="toolbar").
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
Groups related controls with roving arrow-key focus (role="toolbar").
Accessibility
Fully keyboard operable: Tab to focus, Enter/Space to activate. The visible focus ring uses --focus-ring — never remove it. Provide an accessible label (aria-label) for icon-only controls.
Install and import
npx shadcn@latest add @prism/toolbar
import { Toolbar } from '@/components/prism/Toolbar';
In a no-build prototype, read it from the bundle instead: const { Toolbar } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
orientation | "horizontal" | "vertical" | — | |
maxVisible | number | — | How many controls to keep in the row; the rest move into a "More" panel (separators do not count). Default: every control, except on a phone-width screen with more than five, which collapses to four plus "More". Infinity never collapses. |
moreLabel | string | — | Label of the overflow button. Default "More". |
children | React.ReactNode | — | |
className | string | — |