Skip to content
Eskais UI

Forms

Switch

UI SDK Switch with its thumb: an on/off setting that sits in a row beside its Field label.

Example

Installation

npx shadcn@latest add @eskais/switch
Brings alongfield

Usage

Import
import { createSwitchController, Switch, SwitchThumb } from "@/components/ui/switch"

API reference

Other exports

createSwitchControllertype SwitchControllertype SwitchState

Accessibility

  • An on/off setting with role switch; put it in a row beside its label.
  • Grows to 44px on touch.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.