Appica UIUI 1.0.0

Toolbar

A container that groups buttons, links, and inputs together.

Usage

Toolbar is a role="toolbar" strip with a roving tabindex: the toolbar holds a single tab stop, and the arrow keys move focus between its items (with Home/End jumping to the ends). This keeps the whole group to one stop in the page's tab order while still letting keyboard users reach every control. Set orientation="vertical" to stack items and switch the arrow keys to the vertical axis; disabled disables every item at once.

The items are composed, not bespoke: ToolbarButton renders any button you pass to render — most often a ghost Button — so the toolbar inherits your existing styles while the toolbar wiring (focus order, disabled) is added on top. ToolbarSeparator always renders perpendicular to the toolbar (a horizontal toolbar gets vertical dividers, and vice-versa), so you never set its orientation by hand. Give the toolbar an accessible name with aria-label, and name each ToolbarGroup the same way.

A toolbar never reflows: its items keep their size, and when there isn't room the bar caps to the available width and scrolls along its axis instead (the scrollbar is hidden — the clipped edge already hints there's more). That's built in, so you don't wrap it yourself.

Examples

Default

A table toolbar that mixes the part types: a ToolbarInput search box (rendered as an Input), a ToolbarGroup holding a ghost-Button Filter action, and an Export ToolbarLink. Each lands in the same roving-focus order, so one Tab reaches the strip and the arrow keys walk from the search box through to the link. On a narrow screen the bar scrolls sideways rather than reflowing — no wrapper needed.

With a toggle group

A rich-text editing toolbar. The undo/redo ToolbarGroup and a font Select sit beside a true single-select alignment ToggleGroup — built by wrapping each ToolbarButton render={<Toggle …/>} in a ToggleGroup, so the toggles share one pressed value (picking an alignment releases the previous one) while still taking part in the toolbar's roving focus. The selection state is the group's own — no extra wiring.

Vertical orientation

Set orientation="vertical" to stack the items into a column — here a formatting group and a clipboard group. The arrow keys follow the vertical axis and the ToolbarSeparator between the groups flips to a horizontal divider automatically.

RTL

Every Appica UI component supports right-to-left layouts out of the box. Set the dir attribute on a container (commonly your <html> element) so CSS logical properties resolve correctly, and wrap your tree in DirectionProvider so direction-aware behavior — roving focus, popup placement, and the like — follows the same direction.

Items and groups align to the start edge and the arrow-key focus order follows the resolved direction. For setup details and caveats, see the RTL guide.

API reference

Toolbar wraps Base UI's Toolbar. Each part forwards every remaining prop to the matching Base UI primitive, so anything it accepts works here — the tables below list the most common props.

Toolbar

The root strip. Renders a role="toolbar" <div> and exposes data-orientation.

Also forwards ref and every remaining native <div> attribute.

ToolbarButton

A toolbar item button, usually composed with a Button via render.

A link item (<a href>, role="link") that joins the roving focus order.

ToolbarInput

An input item that lives in the toolbar's focus order — a search box or inline value field.

ToolbarGroup

Groups related items under a single role="group". Lay out as a flex row (or column under data-orientation=vertical).

ToolbarSeparator

A divider rendered perpendicular to the toolbar — vertical inside a horizontal toolbar, horizontal inside a vertical one.

Accessibility

  • The root renders role="toolbar"; give it an accessible name with aria-label (or aria-labelledby).
  • Focus uses a roving tabindex — the toolbar is a single tab stop, and the arrow keys move focus between items along the toolbar's orientation.
  • Home / End jump focus to the first and last items.
  • Name each ToolbarGroup with aria-label so its role="group" is announced.
  • disabled on the toolbar (or a group) disables its items; items stay focusable when disabled (focusableWhenDisabled) so keyboard users can still reach and read them.

© 2026 Appica UI. A free component library, crafted by the Appica team.