2.0.15 • Published 11 months ago
react-native-just-checkbox v2.0.15
react-native-just-checkbox (v2)
react-native-just-checkbox is a customizable checkbox component for React Native, offering a variety of configuration options to suit your app's needs.
Key features
- Customizable size and color.
- Animation options.
- Fill mode for different platforms.
Getting Started
Installation
First, install the package:
$ npm install react-native-just-checkbox
Quick Start
import React, { useState } from 'react';
import { StyleSheet, Text, View } from "react-native";
import { CheckBox } 'react-native-just-checkbox';
export default function App() {
const [isChecked, setIsChecked] = useState(false);
return (
<View style={styles.container}>
<CheckBox isChecked={isChecked} onPress={() => setIsChecked(!isChecked)} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fefefe",
justifyContent: "center",
paddingHorizontal: 50,
}
});
Props
Prop | Type | Description | Default |
---|---|---|---|
isChecked | boolean | Whether the checkbox is checked or not. | - |
isDisabled | boolean | Whether the checkbox is disabled or not. Disabled checkboxes will not trigger touch events and their opacity will be set to 0.2. | false |
checkBoxSize | number | The size of the checkbox (applied to both width and height). | 20 |
checkColor | string | The color of the checkmark. | #1a1a1a |
animationType | "bounce" | "opacity" | "none" | The animation type for the checkbox. | "none" |
fillMode | boolean | Whether to fill the background of the CheckBox. If fillMode is set to true , fill color is automatically set to iOS and Android primary colors followed by HIG and Material Design guide. | false |
fillColor | string | The background fill color of the CheckBox. | - |
borderWidth | number | The border width of the CheckBox. | 1.5 |
borderRadius | number | The border radius of the CheckBox. | 3 |
onPress | () => void | Function called when the checkbox is pressed. | - |
Additional
2.0.15
11 months ago
2.0.3
1 year ago
2.0.13
12 months ago
2.0.5
1 year ago
2.0.14
12 months ago
2.0.4
1 year ago
2.0.11
12 months ago
2.0.7
1 year ago
2.0.12
12 months ago
2.0.6
1 year ago
2.0.9
12 months ago
2.0.10
12 months ago
2.0.8
1 year ago
2.0.1
1 year ago
2.0.0
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
5 years ago
1.0.11
5 years ago
1.0.9
5 years ago
1.0.10
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.3
5 years ago
1.0.0
5 years ago