Skip to content

Latest commit

 

History

History
executable file
·
75 lines (69 loc) · 2.37 KB

File metadata and controls

executable file
·
75 lines (69 loc) · 2.37 KB

checkbox-headref

Check Box

Check Box allows the user to select a number of items from a set of choices.
Replacing Component: React Native TouchableOpacity

Preview ios checkbox-headref Preview android checkbox-headref

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