1.0.2 • Published 4 years ago

react-native-round-checkbox v1.0.2

Weekly downloads
13
License
MIT
Repository
github
Last release
4 years ago

react-native-round-checkbox

Getting started

$ npm install react-native-round-checkbox --save

Mostly automatic installation

$ react-native link react-native-round-checkbox

Usage

    import React, { useState } from "react";
    import { View } from "react-native";
    import RoundCheckbox from 'react-native-round-checkbox';

    const [isChecked, setIsChecked] = useState(false)

    <View style={{ flex: 1 }}>
        <RoundCheckbox
            size={16}
            borderColor={'white'}
            backgroundColor={"black"}
            iconColor={'white'}
            checked={isChecked}
            onValueChange={checked => setIsChecked(checked)}
        />
    </View>

Props

PropertyTypeDefaultDescription
iconstringios-checkmarkname of icon (from Ionicons) in the checkbox
backgroundColorstring'#007AFF'background color when checked
sizenumber24icon size
iconColorstring'white'icon color
borderColorstring'grey'border color
checkedbooleanfalsechecked
onValueChangefunctionfunction called on change with new value
styleobject{}overwrite styles that are passed to the parent