1 | @# Switch
|
2 |
|
3 | A switch is simply an alternate appearance for a [checkbox](#core/components/checkbox) that
|
4 | simulates on/off instead of checked/unchecked.
|
5 |
|
6 | @reactExample SwitchExample
|
7 |
|
8 | @## Props
|
9 |
|
10 | ```tsx
|
11 | <Switch checked={this.state.isPublic} label="Public" onChange={this.handlePublicChange} />
|
12 | ```
|
13 |
|
14 | This component supports the full range of HTML `<input>` props.
|
15 | The most common props are detailed below.
|
16 |
|
17 | @interface ISwitchProps
|
18 |
|
19 | @## CSS API
|
20 |
|
21 | @css switch
|