@blueprintjs/core
Version:
Core styles & components
28 lines (18 loc) • 741 B
Markdown
@# Checkbox
A checkbox allows the user to toggle between checked, unchecked, and (sometimes) indeterminate states.
in controlled mode to avoid typings issues.
Enable the `indeterminate` prop for a third in-between state.
```tsx
// simple usage for string labels
<Checkbox checked={this.state.isEnabled} label="Enabled" onChange={this.handleEnabledChange} />
// advanced usage for JSX content
<Checkbox checked={this.state.isEnabled} onChange={this.handleEnabledChange}>
<Icon icon="user" />
John <strong>Doe</strong>
</Checkbox>
```
@## Props interface
This component supports the full range of HTML `<input>` props.
CheckboxProps
CheckboxExample
@## Usage
Use the `checked` prop instead of `value`