Toggle

inprogress

    Overview

    When to use

    Use the Toggle component for situations where users need to switch between two distinct states (e.g., on/off, enabled/disabled, show/hide).

    When to consider an alternative

    t.b.d.


    Component

    Default

    Set state

    Controlled Toggle

    States


    Properties

    Default

    PropertyTypeRequiredDefaultDescription
    utilClassNamesStringfalse-
    childrenNodefalse-
    toggleRefShape
    { "current": "Any" }
    false-
    valueEnum
    "ON" │ "OFF" │ "NEUTRAL"
    false-Exported as Toggle.Value.ON etc.
    onChangeFuncfalse-
    leftIconNodefalse-
    rightIconNodefalse-
    idStringfalse-
    nameStringfalse-
    errorBoolfalse-
    disabledBoolfalse-