Add the dependency:
npm i react-native-rounded-checkbox
"@freakycoder/react-native-bounceable": ">= 0.1.1"
import {
RoundedCheckbox,
PureRoundedCheckbox,
} from "react-native-rounded-checkbox";
<RoundedCheckbox onPress={(checked) => console.log("Checked: ", checked)} />
<PureRoundedCheckbox onPress={(checked) => console.log("Checked: ", checked)} />
Property | Type | Default | Description |
---|---|---|---|
onPress | function | undefined | set your own onPress functionality |
active | boolean | undefined | disables the built-in check system and it let's to control check system |
children | component | Text | change the default Text component with any component like Icon from react-native-dynamic-vector-icons |
text | string | "L" | change the default text value |
isChecked | boolean | false | set the initial checked state |
checkedColor | color | #0bc8a5 | change the background color when checked state is true |
uncheckedColor | color | #f0f0f0 | change the background color when checked state is false |
checkedTextColor | color | #fdfdfd | change the text color when checked state is true |
uncheckedTextColor | color | #5c5969 | change the text color when checked state is false |
textStyle | style | default | set your own text style instead of default one |
outerStyle | style | default | set your own outer style instead of default one |
innerStyle | style | default | set your own inner style instead of default one |
-
LICENSE - Write an article about the lib on Medium
Heavily inspired by William Candillon's Youtube Series
FreakyCoder, kurayogun@gmail.com
React Native Rounded Checkbox is available under the MIT license. See the LICENSE file for more info.