Switch
uitemplate
Switch component
Terminal
$termuijs render switch
Installation
$ bunx termuijs add switch
Copies the source into src/components/switch/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { Switch } from '@termuijs/ui'ts
new Switch(options: SwitchOptions = {})API Reference
Switch
| Prop | Type | Required | Description |
|---|---|---|---|
defaultValue | boolean | optional | — |
label | string | optional | — |
onChange | (value: boolean) => void | optional | — |