Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Toolbar
  3. API and Development

Toolbar

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Toolbar renders a compact role="toolbar" flex row with alt background and border. Set floating with toolbarPosition and optional inset for overlay toolbars; visible toggles display with motion when floating. exclusiveGroup coordinates dismissal across multiple toolbars via a document event. ToolbarDivider separates icon buttons; ToolbarGroup re-exports ButtonGroup for merged controls.
Toolbar
NameTypeDefaultDescription
childrenReactNode—Toolbar groups, separators, and items.
aria-descriptionLocalizedMessage—Extended description for assistive tech.
aria-labelLocalizedMessage—Accessible name when the visible label is insufficient.
aria-labelledbystring—Id of the element that names this toolbar; use {@link ToolbarLabelledByProps} instead. Id of the element that names this toolbar.
aria-placeholderLocalizedMessage—Hint for an empty control.
floatingboolean—A positioned toolbar is floating; leave it unset to choose an axis. When true, absolutely positions the bar within the nearest positioned ancestor.
initialItemIdstring—Item id that receives tabIndex={0} on the first render, including SSR, before items register in effects. Set this to the id of the first enabled {@link ToolbarItem } when a single tab stop is required in static markup.
insetToolbarInset—Inset from positioned edges when floating. Defaults to 4 (--space-4).
labelLocalizedMessage—Accessible name for the toolbar (role="toolbar"). Accessible name prop; use {@link ToolbarLabelProps} instead.
loopboolean—When true, arrow keys wrap from last item to first and vice versa.
orientationToolbarOrientation—Collection axis. Defaults to {@link ToolbarOrientation.Horizontal}. Collection axis. A floating toolbar is always {@link ToolbarOrientation.Horizontal}.
refRef<HTMLDivElement>—Ref to the rendered toolbar element.
titleLocalizedMessage—Native tooltip; accessibility hint, not visible UI title text.
toolbarPositionToolbarPosition—Placement when floating. Defaults to {@link ToolbarPosition.TopRight}.
variantToolbarVariant—Transparent tray with no outer border or shadow. Required to choose a vertical axis. Surface look for the toolbar tray. Defaults to {@link ToolbarVariant.Floating}, which maps to the shipped overlay chrome until the floating elevation token syncs (see CONTRACT.md).
Storybook
Interactive examples and edge cases for this component are in Storybook.
DefaultOpens in a new tab
ToolbarDivider
NameTypeDefaultDescription
orientation"horizontal" | "vertical"verticalDivider axis.
Basic
With divider
With buttons
Floating top right
Floating bottom center
Floating with custom inset
All positions
Previous
Toolbar / Usage
Next
Toolbar / Accessibility
On this page
Toolbar
Storybook
ToolbarDivider
Basic
With divider
With buttons
Floating top right
Floating bottom center
Floating with custom inset
All positions