Skip to content

ToggleButton

Props

API reference for ToggleButton. For usage examples, see the React tab.

ToggleButton

NameTypeDefault
childrenChildrenOrFunction<ToggleButtonRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

defaultSelectedboolean

Whether the element should be selected (uncontrolled).

isDisabledboolean

Whether the button is disabled.

isSelectedboolean

Whether the element should be selected (controlled).

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

Size of the ToggleButton. Ignored when rendered inside a ToggleButtonGroup; use the group's size prop to control sizing for all buttons in the group.

variant"icon" | "text"icon

Icon variant is icon only where text accepts a string and icon.

ToggleButtonGroup

NameTypeDefault
childrenChildrenOrFunction<ToggleButtonGroupRenderProps>

The children of the component. A function may be provided to alter the children based on component state.

disallowEmptySelectionboolean

Whether the collection allows empty selection.

fullWidthboolean

Set to true to span all available space of parent.

isDisabledboolean

Whether all items are disabled.

noSeparatorsbooleanfalse

Sets dividers between the ToggleButtons.

orientationOrientationhorizontal

The orientation of the the toggle button group.

selectionMode"multiple" | "single"single

Whether single or multiple selection is enabled.

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

Size applied to all ToggleButton children in the group. Individual button size props are ignored while inside a ToggleButtonGroup.