This is a react based checkbox component developed using Typescript.
- Pass the Label Value
- Pass Custom Style's
- Customize Icon's in the form of SVG's
- Pass Default Value
- Ripple Animation Effects
- Label position - Left/Right
- Pass disabled mode Styles
interface Props extends React.Props<Checkbox> {
label : string;
style: any;
defaultChecked?: boolean;
checkedIcon?: any;
uncheckedIcon?: any;
};
const styles = {
checkbox: {
marginBottom: 16
}
};
<Checkbox label="Simple" style={styles.checkbox}/>
The above example demonstrates the following:
- How to pass custom label
- How to pass custom style
- Shows the default checked, un-checked icons
const styles = {
checkbox: {
marginBottom: 16
}
};
<Checkbox label="Custom icon" style={styles.checkbox} uncheckedIcon={} checkedIcon={} />
The above example demonstrates the following:
- How to pass custom label
- How to pass custom style
- How to pass custom icon's
- Can use any svg-image as icons for checked, un-checked icons
npm install
npm start
npm run build
Contributions are always welcome. Just send a pull request. Feel free to contact me GitHub.
MIT License