Toolbar

The unified window toolbar: a title, Liquid Glass button groups and a search field.

@cupertinoui-pro/toolbarCupertinoUI Pro

Installation

pnpm dlx shadcn@latest add @cupertinoui-pro/toolbar

Part of CupertinoUI Pro: the CLI installs it with your license key, once the @cupertinoui-pro registry is in components.json.

Usage

import { Toolbar, ToolbarSpacer, ToolbarTitle } from "@/components/ui/toolbar"
import {
  ToolbarButton,
  ToolbarButtonGroup,
} from "@/components/ui/toolbar-button-group"

<Toolbar>
  <ToolbarTitle title="Projects" />
  <ToolbarSpacer />
  <ToolbarButtonGroup>
    <ToolbarButton aria-label="Share">
      <ShareIcon />
    </ToolbarButton>
  </ToolbarButtonGroup>
</Toolbar>
Toolbar buttons have no background of their own: put them in a Toolbar Button Group, the Liquid Glass capsule. Several buttons in one group share a capsule, and a group can work like radio buttons for a view switcher.

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

Toolbar

The 52pt unified toolbar.

PropTypeDescription
classNamestringExtra classes, merged with the component's own.

ToolbarTitle

PropTypeDescription
titleReactNodeThe window title, 15pt semibold.
subtitleReactNodeOptional second line.

ToolbarSpacer

Pushes the items after it to the right.

PropTypeDescription
classNamestringExtra classes, merged with the component's own.