| id | title |
|---|---|
checkbox |
CheckBox |
import { CheckBox } from 'react-native-elements'
<CheckBox
title='Click Here'
checked={this.state.checked}
/>
<CheckBox
center
title='Click Here'
checked={this.state.checked}
/>
<CheckBox
center
title='Click Here'
checkedIcon='dot-circle-o'
uncheckedIcon='circle-o'
checked={this.state.checked}
/>
<CheckBox
center
title='Click Here to Remove This Item'
iconRight
iconType='material'
checkedIcon='clear'
uncheckedIcon='add'
checkedColor='red'
checked={this.state.checked}
/>
<CheckBox
checkedIcon={<Image source={require('../checked.png') />}
uncheckedIcon={<Image source={require('../unchecked.png') />}
checked={this.state.checked}
onPress={() => this.setState({checked: !this.state.checked})}
/>iconTypecomponentcheckedsizeiconRightrightcentertitlecontainerStyletextStyleonLongPressonLongIconPressonPressonIconPresscheckedIconuncheckedIconcheckedColoruncheckedColorcheckedTitlefontFamily
Icon family, can be one of the following: simple-line-icon, zocial, octicon, material, material-community, ionicon, foundation, evilicon, entypo (required only if specifying an icon that is not from font-awesome)
| Type | Default |
|---|---|
| string | fontawesome |
Specify React Native component for main button (optional)
| Type | Default |
|---|---|
| React Native Component | TouchableOpacity |
Flag for checking the icon (required)
| Type | Default |
|---|---|
| boolean | false |
Size of the checkbox
| Type | Default |
|---|---|
| number | 24 |
Moves icon to right of text (optional)
| Type | Default |
|---|---|
| boolean | false |
Aligns checkbox to right (optional)
| Type | Default |
|---|---|
| boolean | false |
Aligns checkbox to center (optional)
| Type | Default |
|---|---|
| boolean | false |
Title of checkbox (required)
| Type | Default |
|---|---|
| string | none |
Style of main container (optional)
| Type | Default |
|---|---|
| object (style) | none |
Style of text (optional)
| Type | Default |
|---|---|
| object (style) | none |
onLongPress function for checkbox (optional)
| Type | Default |
|---|---|
| function | none |
onLongPress function for checkbox (optional)
| Type | Default |
|---|---|
| function | none |
onPress function for container (optional)
| Type | Default |
|---|---|
| function | none |
onPress function for checkbox (required)
| Type | Default |
|---|---|
| function | none |
Default checked icon (Font Awesome Icon) (optional)
| Type | Default |
|---|---|
| string OR React Native Component | check-square-o |
Default checked icon (Font Awesome Icon) (optional)
| Type | Default |
|---|---|
| string OR React Native Component | square-o |
Default checked color (optional)
| Type | Default |
|---|---|
| string | green |
Default unchecked color (optional)
| Type | Default |
|---|---|
| string | #bfbfbf |
Specify a custom checked message (optional)
| Type | Default |
|---|---|
| string | none |
Specify different font family
| Type | Default |
|---|---|
| string | System font bold (iOS), Sans Serif Bold (android) |
