Controls
Control switch
on or off in a panel row · the thumb’s side says which
function ControlSwitchDemo() { const [on, setOn] = React.useState(true); return <ControlRow className={narrow} label="Bordered" htmlFor="demo-bordered" trailing={<ControlSwitch id="demo-bordered" label="Bordered" checked={on} onChange={setOn} />} />;}API
<ControlSwitch label checked onChange id? />Get it
Already in every copy of the web kit:
import { ControlSwitch } from '@/components/controls/switch';Details
- Exports
ControlSwitch- Packages
- cn@^0.5.2
- Also searched as
- toggle, boolean, checkbox
- Registry JSON
- /r/web/control-switch.json
Agents: the whole registry is at /llms.txt.