Toolbar
A bar of controls that takes a single tab stop, the arrow keys moving between its buttons, toggles and links, each tool transparent at sm by default.
Usage
Examples
Appearances
appearance paints a ToolbarButton or a ToolbarToggleItem in a Button's appearances, solid, soft, outline or transparent, the default.
Tones
tone colours a ToolbarButton in a Button's tones, neutral by default, accent, destructive, success, warning or info, with every appearance.
Sizes
size sets a tool's height at a Button's heights, xs, sm (the default), base or lg, on a ToolbarButton or a ToolbarToggleItem alike, and a tool holding only an icon is square at each of them.
Border radius
borderRadius sets the corners of the bar and of every tool in it on the kit's one scale: none, xs 4px, sm 6px, base 8px (the default), lg 12px, xl 16px, or full to round them; a tool's own borderRadius stands over the bar's.
Tools
tools lists the bar's tools as data, each a square button named by its tooltip: a button runs its onClick, a menu opens its rows (one without an onClick is off), a panel opens beside the focus, and a choice of alignments shows the current one.
Rect
rect floats the toolbar over that box, such as the text being edited: above it, or below it when there is no room, portalled and kept on screen; without one it sits in place.
Content goes here.
Collision padding
collisionPadding keeps a floating toolbar that far inside the screen's edges, by default 8px inside its container or clear of the app's header; here its top reaches down to the text, so with no room above it the toolbar drops below.
Content goes here.
Orientation
orientation="vertical" stacks the tools in a column, moved through with the up and down arrow keys, beside a bar in a row as it is by default.
Disabled
disabled dims a tool and the arrow keys pass it by, beside one as it is by default.
API Reference
Toolbar
ToolbarProps · components/Toolbar/Toolbar.types.tsToolbarButton
ToolbarButtonProps · also takes the props of Radix Toolbar.ButtonToolbarLink
ToolbarLinkProps · also takes the props of NextLinkToolbarSeparator
ToolbarSeparatorProps · takes the props of Radix Toolbar.SeparatorToolbarToggleGroup
ToolbarToggleGroupProps · takes the props of ToggleGroupToolbarToggleItem
ToolbarToggleItemProps · also takes the props of ComponentProps< typeof ToggleItem >ToolbarRect
used by rectToolbarTool
used by toolsToolbarMenuRow
used by its partsAlignmentChoice
used by its partsIt also takes the props of Radix Toolbar.Root, Radix Popover.Root, Radix Popover.Content.