Module / v1.0.0-beta.13

@typed/ui/Switch

8 unique exports available through this public import path, including their members and aliases.

Learn this UI primitive →

import * as Switch from "@typed/ui/Switch";

Native controls

  • Switch

    function

    Renders a button-backed ARIA switch.

Rendered content

State construction

  • makeState

    function

    Creates hydrated switch state independent of rendering.

State transitions

  • setChecked

    function

    Sets the switch to the requested checked state.

  • toggle

    function

    Toggles the switch between checked and unchecked.

interface

  • InitialState

    interface

    Public interface exposed as InitialState from @typed/ui/Switch.

  • State

    interface

    Public interface exposed as State from @typed/ui/Switch.

variable

  • StateSchema

    variable

    Public variable exposed as StateSchema from @typed/ui/Switch.