UNPKG

451 BMarkdownView Raw
1@# Switch
2
3A switch is simply an alternate appearance for a [checkbox](#core/components/checkbox) that
4simulates 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
14This component supports the full range of HTML `<input>` props.
15The most common props are detailed below.
16
17@interface ISwitchProps
18
19@## CSS API
20
21@css switch