Skip to main content

    ToggleButtonGroup

    ToggleButtonGroup lets users toggle between a set of related options, typically with one preselected. It's best for switching between views or a compact group of options with immediate effect.

    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