Toggle button group displays a set of options and allows user to select only one. The default height is 32px.
Use the separated variant when the group needs more visual weight.
When the toggle button is large, it has a larger height of 64px, and icons go on their own row.
When the toggle button is small, it has a smaller height of 24px.
Usually it's best to let the group manage its own size, but "width" can be set to "auto" to let the parent take over.
Icons can be used in buttons when additional clarity is required and the icon is highly relevant to the action. Icons should not be used for decoration.
A disabled button indicates that an action exists, but is not available currently.
| Name | Default | Description |
|---|---|---|
isDisabled | false | booleanDetermines if all radios are disabled. |
children | — | ReactNodeRadio inputs. |
size | — | "sm" | "md" | "lg"Toggle button size. |
value | — | string | undefinedSelected radio value. |
onChange | — | (value: string) => voidCallback for when user selects a different radio option. |
width | — | "auto" |
variant | — | "segmented" | "separated"Default: "segmented" |
| Name | Default | Description |
|---|---|---|
aria-label | — | stringToggle button's meaning for screen readers |
isDisabled | — | booleanDetermines if toggle button is disabled. |
accessory | — | IconAccessoryTypePrimary icon that's displayed on the left. |
label | — | ReactNodeToggle button label. |
value | — | stringToggle button value. |
tooltip | — | Omit<TooltipProps, "children">Tooltip to display when hovering over the toggle button. |