Skip to content

Toggle button group

Groups toggle buttons for one or more choices.

toggle-button-group-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Multiple text styles

Selection preview

The quick brown fox jumps over the lazy dog.

toggle-button-group-editor-demo.tsx

Sizes

toggle-button-group-sizes-demo.tsx

API reference

vip/ui adds or changes the props below. For all other props, see React Aria ToggleButtonGroup (opens in a new tab).

size: "xs" | "sm" | "md" | "lg" | "xl"
Sets the size of each toggle in the group. A size on a toggle overrides it.