Get StartedComponentsStylingThemingMath & Science
MCP

Forms

Toggle Group

A set of toggles with single or multiple selection, horizontal or vertical.

Markdown

Import

tsx
import { ToggleGroup } from "@indoku/ui"

Examples

Basic usage

Props

Root

PropTypeDefaultDescription
type"single" | "multiple"single"single": at most one active. "multiple": any number.
valuestring[]–Always an array, even for type="single" (0 or 1 items).
defaultValuestring[]–
onValueChange(value: string[]) => void–
variant"outline" | "ghost" | "subtle"–
size"sm" | "md" | "lg"–
disabledboolean–
spacingnumber2Gap between items (spacing token). 0 joins the items (connected borders).
orientation"horizontal" | "vertical"–

Item

PropTypeDefaultDescription
value*string–

* required. Style props and HTML attributes are accepted as well.

Created by @indokudev