@hmiproject/helio-sdk
    Preparing search index...

    Function Switch

    • Component that displays a switch using the currently active HELIO theme.

      Parameters

      • props: {
            ariaLabel?: string;
            checked: boolean;
            disabled?: boolean;
            onCheckedChange(checked: boolean): void;
        }
        • OptionalariaLabel?: string

          Provide an accessible name for screen readers. The switch renders no visible label of its own, so set this unless a visible label is associated with it elsewhere.

          `Dark mode`
          
        • checked: boolean

          The checked state of the switch.

        • Optionaldisabled?: boolean
          false
          
        • onCheckedChange: function
          • Called when the user toggles the switch.

            Parameters

            • checked: boolean

            Returns void

      Returns Element

      1.0.0