---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Toolbar

A row of controls over a list, such as a period select and its filter and view buttons, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `Toolbar`.

## Try it

Set the task’s status, priority, owner and due week from the toolbar’s menus; each change is written in the history under it, and the round action at the row’s end undoes the last one. Narrow the window and the row wraps.

The task and its history live in the page only. The row is not an arrow-key toolbar: each control is its own Tab stop, as the theme draws it.

## When to use

- A row of controls over a list, such as a period select and its filter and view buttons.

## Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Toolbar on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-toolbar.json --yes
```

```text
Add the Goop Toolbar to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
import { Toolbar, ToolbarButtonIcon, ToolbarButton, ToolbarAction } from '@/components/ui/goop/toolbar';

<>
  <Toolbar role="group" aria-label="View">
    <ToolbarButton icon="calendar-plus">This week</ToolbarButton>
    <ToolbarAction icon="filter-2" aria-label="Filter" />
  </Toolbar>
  <Toolbar variant="wrap" role="group" aria-label="Task properties">
    <ToolbarButton icon="calendar-plus">This week</ToolbarButton>
    <ToolbarButton icon="dots" aria-label="More properties" />
  </Toolbar>
</>
```

- Fits: list, overview: toolbar.
- height, width, padding, gap, background, text: add no class for these.

## API reference

### Options

- `variant: default | wrap = default`

### Parts

- `ToolbarButtonIcon` — The property button's glyph, as a part; className?: string — Classes for the button's glyph (a mark's colour)
- `ToolbarButton` — A property of the row, showing its value; variant: default (default), value, owner; icon: IconName — A pack icon name; tooltip?: string | false — An icon alone's tooltip: its `aria-label` when left out; other words; `false` for none; also takes type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; loading?: boolean = false; loadingLabel?: string = 'Loading'
- `ToolbarAction` — A round glyph control of the row (a filter, a view's options); icon: IconName — A pack icon name; also takes type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; aria-label: string; tooltip?: string | false; tooltipKeys?: readonly string[]; loading?: boolean = false; loadingLabel?: string = 'Loading'

- Class recipes (cva): toolbarVariants (Toolbar), toolbarButtonVariants (ToolbarButton)
- data-slot values (to select a part by): toolbar

## Keyboard

- Enter: activate
- Space: activate

## Accessibility

- The part itself answers the keys above.
- hover, active, focus-visible, focus-within: the browser's own (:hover, :active, :focus-visible, :focus-within): write nothing
- disabled: the prop disabled

## Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

## Related

- [Footer](/themes/trail/components/footer): The closing band of a marketing or a docs page, with its groups of links, legal text and small print.
- [Resizable panel group](/themes/trail/components/resizable): Panes a person resizes by dragging the handle between them, or with its keys.
- [Scroll area](/themes/trail/components/scroll-area): A region of content that scrolls behind thin bars that float over its edge.
- [Section header](/themes/trail/components/section-header): The title row over one block inside a page, with an optional count, description and actions, such as a settings section.
