1.0.4 • Published 5 years ago

@rn-components-kit/checkbox v1.0.4

Weekly downloads
9
License
MIT
Repository
github
Last release
5 years ago

CheckBox

NPM version

English | 中文

CheckBoxes allow users to complete tasks that involve making choices such as selecting options, or switching settings on or off.

How to use

npm install @rn-components-kit/checkbox --save
PreviewCode
Demo1 Code
Demo2 Code
Demo3 Code
Demo4 Code

Props

Reference

Props

style

Allow you to customize style

TypeRequiredDefault
objectno-

title

Title of checkbox

TypeRequiredDefault
stringyes-

titleStyle

Allows you to customize title's style

TypeRequiredDefault
objectno-

iconSize

Size of icon (or width and height for image, if you specify checkedImage/unCheckedImage)

TypeRequiredDefault
numberno20

disabled

Determines whether checkbox is available

TypeRequiredDefault
booleannofalse

checked

Flag for checking the icon

TypeRequiredDefault
booleannofalse

checkedIconType

Checked icon (Icon Preset)

TypeRequiredDefault
stringno'check-square-fill'

checkedIconColor

Color of checked icon

TypeRequiredDefault
stringno'#1890FF'

checkedImage

If you are not satisfied with icon preset, you can specify an image for checked icon

TypeRequiredDefault
stringno-

unCheckedIconType

UnChecked icon (Icon Preset)

TypeRequiredDefault
stringno'border'

unCheckedIconColor

Color of unChecked icon

TypeRequiredDefault
stringno'#BFBFBF'

unCheckedImage

If you are not satisfied with icon preset, you can specify an image for unChecked icon

TypeRequiredDefault
stringno-

animationType

Determines which animation is adpoted when checked value changes

  • none: no animation
  • opacity: fade in/out
  • size: zoom in/out
TypeRequiredDefault
enum('none', 'opacity', 'size')no'opacity'

onPress

() => void

A callback will be triggered when checkbox is pressed

TypeRequiredDefault
functionno() => {}