Home Manual Reference Source Repository
import Checkbox from 'mrn/lib/Checkbox.js'
public class | source

Checkbox

Extends:

react-native~Component → Checkbox

Checkbox Component

Example:

<Checkbox value="1" label="Checkbox On" checked={true}/>
<Checkbox value="2" label="Checkbox Off"/>
<Checkbox value="3" label="Checkbox On Disabled" checked={true} disabled={true}/>
<Checkbox value="4" label="Checkbox Off Disabled" disabled={true}/>
<Checkbox value="5" checked={true}/>
<Checkbox value="6"/>

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

state: {scaleValue: Animated.Value, opacityValue: Animated.Value}

Public Constructors

public constructor(props: object) source

Params:

NameTypeAttributeDescription
props object
props.label string
  • optional

Checkbox can have a label to describe it.

props.theme enum(THEME_NAME)
  • optional
  • default: 'light'

Theme of Checkbox

props.primary enum(COLOR_NAME)
  • optional
  • default: PRIMARY

Primary color name.

props.value string

Checkbox must have a value

props.checked boolean
  • optional

Specifies that an Checkbox should be pre-selected

props.disabled boolean
  • optional

Specifies that an Checkbox element should be disabled

props.onCheck function(isChecked: boolean, value: string)
  • optional

Function will be triggered when check or uncheck the Checkbox

Public Members

public state: {scaleValue: Animated.Value, opacityValue: Animated.Value} source