Floating button group
A toolbar of icon and label buttons with separators and pressed states.
Your workspace is ready. Invite your team before Friday to keep the 30-day trial for everyone.
When to use
- Editor and canvas toolbars with a few formatting actions.
- Floating controls over content.
When not to use
- The actions are mutually exclusive; use a segmented control.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/floating-button-group
Adds its 3 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
FloatingButtonGroup
6 props
PropTypeDefault
items *readonly FloatingItem[]—
label *string—
variant"muted" | "floating""muted"
orientation"vertical" | "horizontal""horizontal"
onAction((id: string) => void)—
classNamestring—
Keyboard
- ↓
- Moves to the next item or value.
- →
- Moves to the next item or value.
- ↑
- Moves to the previous 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 and separator semantics, with aria-disabled, aria-label, aria-orientation and aria-pressed 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/floating-button-group.mdThe index of every part is at /llms.txt.