Check Box allows the user to select a number of items from a set of choices.
Replacing Component: React Native TouchableOpacity
Syntax
import React, { Component } from 'react';
import { Container, Header, Content, ListItem, CheckBox, Text, Body } from 'native-base';
export default class CheckBoxExample extends Component {
render() {
return (
<Container>
<Header />
<Content>
<ListItem>
<CheckBox checked={true} />
<Body>
<Text>Daily Stand Up</Text>
</Body>
</ListItem>
<ListItem>
<CheckBox checked={false} />
<Body>
<Text>Discussion with Client</Text>
</Body>
</ListItem>
<ListItem>
<CheckBox checked={false} color="green"/>
<Body>
<Text>Finish list Screen</Text>
</Body>
</ListItem>
</Content>
</Container>
);
}
}Configuration
| Property | Default | Option | Description |
|---|---|---|---|
| checked | false | boolean | State value of an item from set of choices |
| color | - | user-defined | Background color of checkbox |
| onPress | - | - | Handler to be called when the user selects / unselects the checkbox |

