IconButtonToggle
Wraps a set of IconButton
or IconButtonWithTooltip
components in a group and marks as active only one at a time.
The IconButton with a value matching the 'activeValue' is set to be in the active state.
When one presses on one of the buttons, that button is set to active state, and the callback passed to onChange
is called with that value.
You can pass a tooltip if you use the IconButtonWithTooltip
subcomponent.
Basic Usage
Basic Usage (with tooltips)
IconButtonToggle Props API
- activeValue
string
value to use to check which button to set to active
- onChange
func
Default() => {}handler that is passed the currently active button's value when a button is selected
- children
node
Requiredchild nodes of type
IconButton
(or its subcomponents) to be rendered within toggle group