Skip to main content

Toolbar

Groups related controls with roving arrow-key focus (role="toolbar").

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When 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​

PropTypeRequiredDescription
orientation"horizontal" | "vertical"—
maxVisiblenumber—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.
moreLabelstring—Label of the overflow button. Default "More".
childrenReact.ReactNode—
classNamestring—