Checkbox

Checkboxes allow the selection of multiple options from a set.

Usage

export default class MyComponent extends Component {
  state = {
    checked: false,
  };

  render() {
    const { checked } = this.state;
    return (
      <Checkbox
        checked={checked}
        onPress={() => { this.setState({ checked: !checked }); }}
      />
    );
  }
}

Props

checked (required)
Type: boolean

Whether checkbox is checked.

disabled
Type: boolean

Whether checkbox is disabled.

onPress
Type: Function

Function to execute on press.

color
Type: string

Custom color for checkbox.

theme
Type: Theme