react-native-android-checkbox

3.1.1 • Public • Published

Deprecation Notice

React Native now has it's own CheckBox component as of version 0.49. This library will continue to exist, but will not receive updates. You should use the native component.

react-native-android-checkbox

A React Native checkbox using the stock android widget

Checkbox Example App

Installation

Install the npm package

npm install --save react-native-android-checkbox

Link the android library

react-native link react-native-android-checkbox

Basic Usage

The checkbox component works in exactly the same way as React.Switch

import React from 'react'
import Checkbox from 'react-native-android-checkbox'
 
class ExampleComponent extends React.Component {
  constructor() {
    super()
    this.state = {
      value: false
    }
  }
 
  render() {
    return (
      <Checkbox
        value={this.state.value}
        disabled={false}
        onValueChange={(value) => {
          this.setState({ value })
        }}
        tintColor="#C14C4E"
      />
    )
  }
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.1.1
    2
    • latest

Version History

Package Sidebar

Install

npm i react-native-android-checkbox

Weekly Downloads

3

Version

3.1.1

License

ISC

Last publish

Collaborators

  • mikemonteith