# Upstage Design System — Switch (product)
- context: product · group: forms
- source revision: lift-1.2.3 (Lift 1.2.3, zip sha256 8d5d9377c2b4…)
- status: content source-derived · availability implemented · verification static-only
- human docs: /en/components/product/switch/ · machine doc: /agent/components/product/switch.md
## Required references (read these)
- /components/forms/Switch.jsx — implementation · sha256 59fc087f3990…
- /components/_types.d.ts — api · key SwitchProps
- /components/forms/Switch.prompt.md — usage-note · sha256 3fca7568a4e7…
- /kit/rules/a11y-contract.json — a11y · key Switch
## API (components/_types.d.ts SwitchProps)
- checked?: boolean
- defaultChecked?: boolean (default false)
- onChange?: (checked: boolean) => void
- disabled?: boolean (default false)
- label?: React.ReactNode
- describedBy?: string — 보조 설명 요소의 id (aria-describedby).
- style?: React.CSSProperties
## Accessibility contract
- keys: Space, Enter
- aria: role=switch, aria-checked, aria-labelledby
## Unverified
- Browser behaviour is not verified here (static source check only).
Supported environment
The Lift 1.2.3 reference implementation is a React 18 function component with inline styles referencing Product tokens (hsl(var(--*))), so styles.product.css must be loaded. The mapping to an npm package could not be verified in this repository.
API
Copied from SwitchProps in components/_types.d.ts.
| prop | type | default | doc |
|---|---|---|---|
checked | boolean | — | |
defaultChecked | boolean | false | |
onChange | (checked: boolean) => void | — | |
disabled | boolean | false | |
label | React.ReactNode | — | |
describedBy | string | — | 보조 설명 요소의 id (aria-describedby). |
style | React.CSSProperties | — |
Code
One import line plus the example code from the usage note.
import { Switch } from "./components/forms/Switch.jsx";<Switch defaultChecked label="Streaming responses" />Token bindings
Tokens the implementation references with var(). Names assembled at runtime (e.g. --state-${tone}-fg) are not listed.
--duration-fast, --ease-standard, --font-sans, --foreground, --primary, --shadow-sm, --switch-thumb, --switch-track-off, --transition-colors
Source
components/forms/Switch.jsximplementation · sha256 59fc087f3990…components/_types.d.tsapi · SwitchPropscomponents/forms/Switch.prompt.mdusage-note · sha256 3fca7568a4e7…kit/rules/a11y-contract.jsona11y · Switch