Skip to content
caliper ui pro docs

Expanding button group

A row of icon buttons where the focused one expands to show its label.

Pro

When to use

  • Share and reaction rows where space is tight.
  • Each action briefly confirms when used.

When not to use

  • Labels must always be visible; use a button group.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/expanding-button-group

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

ExpandingButtonGroup

6 props
PropTypeDefault
items *readonly ExpandingAction[]—
label *string—
defaultExpandedstring—
confirmDurationnumber1400
onAction((id: string) => void)—
classNamestring—

Keyboard

→
Moves to the next item or value.
←
Moves to the previous item or value.
Home
Jumps to the first item or the minimum.
End
Jumps to the last item or the maximum.

Accessibility

It exposes toolbar semantics, with aria-label, aria-disabled, aria-busy and aria-hidden kept in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/expanding-button-group.md

The index of every part is at /llms.txt.

More in Actions