Skip to main content

ToggleButtonGroup

The ToggleButtonGroup is used to group related options. The group consists of at least two ToggleButtonGroupItems. The ToggleButtonGroup supports exclusive selection only. That means that selecting one option deselects any other.

Import

import { ToggleButtonGroup } from '@dynatrace/strato-components-preview/buttons';

Use cases

CodeSandbox

Disable options

The toggle button group can either be completely disabled or alternatively just specific options can be disabled. Both can be done by applying the disabled prop to the corresponding item (the group or the button itself).

CodeSandbox

Control the state

To observe the value and act on its changes it's also possible to listen to changes and manually set the value accordingly.

CodeSandbox
Still have questions?
Find answers in the Dynatrace Community