Skip to content
Playground

Toolbar

A keyboard-navigable collection of related controls with semantic surfaces.

A keyboard-navigable collection of related controls on a neutral card surface. Toolbar styling follows the design-system Toolbar spec: 32px controls, subtle gray inputs, vertical dividers, and toggle-like pressed treatment for aria-pressed buttons.

Backed by Base UI Toolbar for upstream behavior and configuration. Zenos owns the public API, styling, and composition shown on this page.

TSX
import { Toolbar } from "@zentara-co/zenos-ui";

Combine icon buttons, text buttons, inputs, links, groups, and separators in one roving-focus collection. Icon-only controls need aria-label. Text and icon children use the same automatic padding rules as Toggle.

Default toolbar buttons use a transparent ghost surface with neutral hover. Set aria-pressed for a red selected treatment (for example a sticky filter). Toolbar.Input uses the subtle gray field and defaults to w-60. Other Button variants (primary, outline, …) remain available when a control needs stronger emphasis.

Horizontal toolbars use Left and Right Arrow. Vertical toolbars stack full-width, centered items and use Up and Down Arrow. Separator orientation follows the toolbar automatically.

Group controls that perform related work and name each group when that relationship is useful to assistive technology. Separators provide visual boundaries between groups.

Every Toolbar part accepts className. Style a part directly, or scope a cohesive treatment from Toolbar.Root with the stable data-slot attributes. Keep orientation, pressed state, labels, and other behavior expressed through their dedicated props and native attributes.

PropTypeDefaultDescription
orientation 'horizontal' | 'vertical' horizontal Layout and arrow-key navigation direction.
variant (Button / Link) ButtonVariant ghost Ghost and destructive use toolbar-native surfaces; other values reuse Button styles.
size (Button / Link) 'sm' | 'md' | 'lg' sm Applies when using non-toolbar Button variants.
aria-pressed (Button) boolean — Shows the red selected toolbar treatment.
Toolbar.Root
Toolbar.Group
Toolbar.Button
Toolbar.Link
Toolbar.Input
Toolbar.Separator

API

PropTypeDefaultDescription
orientation horizontal | vertical horizontal Toolbar navigation axis.
variant ButtonVariant ghost Ghost and destructive use Toolbar surfaces; other values reuse Button styling.
size sm | md | lg sm Button and link size when using Button variants.
render ReactElement | function — Composes toolbar links or buttons.
loopFocus boolean true Wraps roving focus at the first and last controls.
native props React.Base UI Toolbar props — Forwards native attributes, events, aria-*, data-*, className, style, and ref.

Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props, including className, style, aria-*, and data-*.

Give every toolbar an accessible name and every icon-only control a specific label. Base UI manages roving focus, skips disabled controls, loops by default, and uses Home and End to reach the first and last available item. Tab enters or leaves the toolbar as one stop; arrow keys move within it.