Skip to content

Toolbar

Free

A row or column of controls, such as the bar of a text editor. Tab reaches it once, and the arrow keys move between its buttons.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Compose the buttons and give it a name.

format-bar.tsx

Toolbar

<div>
PropTypeDefaultDescription
variant"outline""plain""outline"
classNamestring—
From Base UIToolbar.RootBase UI docs
disabledboolean—
orientation"horizontal""vertical""horizontal"The orientation of the toolbar.
loopFocusbooleantrueIf true, using keyboard navigation will wrap focus to the other end of the toolbar once the end is reached.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ToolbarGroup

<div>
PropTypeDefaultDescription
classNamestring—
From Base UIToolbar.GroupBase UI docs
disabledbooleanfalseWhen true all toolbar items in the group are disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ToolbarButton

<button>
PropTypeDefaultDescription
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs""sm"
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary""ghost"
classNamestring—
unstyledbooleanfalseDrop the Button look and keep only className. Use it when render mounts a component with its own look (a Toggle, a ToggleGroupItem, a SelectTrigger), or the two looks mix.
chevronbooleanfalseAdd a chevron after the content, for a button that opens a menu, a select, or a popover with its current value in front ("Heading 1", a list icon, the color "A"). See the JSDoc of ToolbarButton. Default false.
From Base UIToolbar.ButtonBase UI docs
disabledbooleanfalseWhen true the item is disabled.
focusableWhenDisabledbooleantrueWhen true the item remains focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

ToolbarLink

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ToolbarInput

<input>
PropTypeDefaultDescription
rounded"default""full"—
size"default""lg""sm""xs""sm"
surface"default""group"—
classNamestring—
From Base UIToolbar.InputBase UI docs
disabledbooleanfalseWhen true the item is disabled.
focusableWhenDisabledbooleantrueWhen true the item remains focusable when disabled.
defaultValuestring | number | readonly string[]—
...props<input> attributes—Every other attribute goes to the <input>, with a ref.

ToolbarSeparator

<div>
PropTypeDefaultDescription
classNamestring—
From Base UIToolbar.SeparatorBase UI docs
orientation"horizontal""vertical"—The orientation of the separator. Defaults to the opposite of the toolbar's orientation, so a horizontal toolbar renders vertical separators.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it for controls that belong together. Give it an aria-label.
  • Put groups of toggles in ToolbarGroup.
  • Use orientation="vertical" for a side rail.
TabMoves into the bar once, then out of it.
Left ArroworRight ArrowMoves between items. Up and Down do it when vertical.
HomeorEndGoes to the first or the last item.

Give it an aria-label, such as "Text formatting".

One Tab stop for the whole bar. Arrow keys move inside it.

A group with an aria-label names itself as the focus enters it.

Built with

Installs with Toolbar

Components
Button,Separator
  1. AddedToolbar, with Button, Separator.
Open the release