Installation
- CLI
- Manual
Usage
Import the toolbar components and compose them together:Components
Toolbar
The root container component that wraps all toolbar items. Props: ExtendsReact.ComponentProps<typeof ToolbarPrimitive.Root>
ToolbarButton
A wrapper for rendering buttons within the toolbar with consistent styling. Props: ExtendsReact.ComponentProps<typeof ToolbarPrimitive.Button>
render- A React element to render inside the button wrapper
ToolbarLink
A link element styled for use within the toolbar. Props: ExtendsReact.ComponentProps<typeof ToolbarPrimitive.Link>
href- The URL the link points to
ToolbarInput
A wrapper for rendering input fields within the toolbar. Props: ExtendsReact.ComponentProps<typeof ToolbarPrimitive.Input>
render- A React element to render inside the input wrapper
ToolbarGroup
Groups related toolbar items together visually. Props: ExtendsReact.ComponentProps<typeof ToolbarPrimitive.Group>
ToolbarSeparator
A visual separator between toolbar items or groups. Props: ExtendsReact.ComponentProps<typeof ToolbarPrimitive.Separator>
Examples
Basic Toolbar
Toolbar with Input
Combine toolbar buttons with input fields:Toolbar with Link
Include links for help or documentation:Accessibility
- The toolbar follows WAI-ARIA toolbar pattern
- Keyboard navigation is supported with arrow keys
- Focus management is handled automatically
- Use appropriate
aria-labelattributes on icon-only buttons
