Skip to main content

    Switch

    The Switch component allows users to toggle between two different states. You can set a specific initial value using the defaultValue prop for an uncontrolled switch or setting the initial value of the state of a controlled switch accordingly. The name prop also needs to be specified for identifying the Switch when submitting it in a form.

    SwitchProps

    Signature:

    export declare type SwitchProps = <, (checked: , event?: <>) => | > & & & & & { /** The used as the value of the switch when submitting it in a form, if the switch is toggled on. */ formValue?: ; };
    Still have questions?
    Find answers in the Dynatrace Community