iSaBo
iSaBo

Reputation: 187

How to set background color for react-native-checkbox library

How can i set the background-color for checkboxes library https://github.com/react-native-checkbox/react-native-checkbox?

I use iOS as a platform.

Thank you for your help!

Upvotes: 0

Views: 1408

Answers (1)

Ali Amjad Hassan
Ali Amjad Hassan

Reputation: 59

use tintColor prop to set color of the box when the checkbox is Off.

use onCheckColor prop to set color of the check mark when it is On.

use onFillColor prop to set color of the inside of the box when it is On.

use onTintColor prop to The color of the line around the box when it is On.

the value of above mentioned props will be hexadecimal value of color.

For example

<CheckBox
onFillColor={"#FF5733"}
disabled={false}
value={toggleCheckBox}
onValueChange={(newValue) => setToggleCheckBox(newValue)}
/>

Upvotes: 2

Related Questions