bloxa

Toggle Group

FREE

Segmented control with a sliding highlight, plus outline and ghost toolbars; single or multiple choice.

Installation

Terminal
npx @bloxa/cli add toggle-group
# or: npx shadcn@latest add @bloxa/toggle-group

Packages installed automatically: motion, radix-ui

Examples

Segmented control

The highlight glides to the new choice.

Selected: week

Toolbar

API reference

Every component also accepts the props of the element it renders.

ToggleGroup

PropTypeDefaultDescription
type"single" | "multiple""single"Single or multiple choice.
variant"segmented" | "outline" | "ghost""segmented"Look.
size"sm" | "md" | "lg""md"Size.
fullWidthbooleanfalseFill the width.

Toggle

PropTypeDefaultDescription
pressed / onPressedChangeboolean / (pressed) => void—On state.
variant"ghost" | "outline""ghost"Look.