Combines the Toggle Group radix component with the Chip primitive styling

Used as a method for filtering a collection of data. Acts like multiple or single selection. Each chip toggles between selected and unselected. When selected, a checkmark appears as the leading icon.

<ChipToggleGroup
type="multiple"
defaultValue={['a', 'b']}
onValueChange={(value) => {
console.log(value)
}}
>
<ChipToggleGroup.Item value="a">A</ChipToggleGroup.Item>
<ChipToggleGroup.Item value="b" disabled>
B
</ChipToggleGroup.Item>
<ChipToggleGroup.Item value="c">C</ChipToggleGroup.Item>
<ChipToggleGroup.Item value="d" disabled>
D
</ChipToggleGroup.Item>
</ChipToggleGroup>

API Reference

ChipToggleGroupRoot

PropTypeDefaultRequired
direction
"row" | "row-reverse" | "column"

-

-

gap
1 | 2 | 3 | 1 & { "@sm"?: number | boolean | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "false" | undefined; "@md"?: number | boolean | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "false" | undefined; ... 5 more ...; "@initial"?: number | ... 12 more ... | undefined; } & { ...; } | 2 & { "@sm"?: number | boolean | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "false" | undefined; "@md"?: number | boolean | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "false" | undefined; ... 5 more ...; "@initial"?: number | ... 12 more ... | undefined; } & { ...; } | 3 & { "@sm"?: number | boolean | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "false" | undefined; "@md"?: number | boolean | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "false" | undefined; ... 5 more ...; "@initial"?: number | ... 12 more ... | undefined; } & { ...; }

-

wrap
"wrap" | "no-wrap" | "wrap-reverse"

-

-

justify
boolean

-

-

align
boolean

-

-

cssCSSProperties

-

-

asJSX.IntrinsicElements

-

-

asChild
boolean

-

-

orientation
"horizontal" | "vertical"

-

-

loop
boolean

-

-

type
"single" | "multiple"

-

value
string | string[]

-

-

onValueChange
(value: string) => void | (value: string[]) => void

-

-

disabled
boolean

-

-

rovingFocus
boolean

-

-

ChipToggleGroup.Item

PropTypeDefaultRequired
valuestring

-

asChild
boolean

-

-

size
"sm" | "md" | "lg"
md

-

asWorkaround
"symbol" | "object" | "a" | "button" | "div" | "h2" | "h3" | "img" | "li" | "nav" | "ol" | "p" | "span" | "svg" | "ul" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "noindex" | "noscript" | "optgroup" | "option" | "output" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "source" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "var" | "video" | "wbr" | "webview" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | ComponentClass<any, any> | FunctionComponent<any>

-

-

cssCSSProperties

-

-