Logo

Checkbox.Item

Checkbox.Item allows you to press the whole row (item) instead of only the Checkbox.

Usage

import * as React from 'react';
import { View } from 'react-native';
import { Checkbox } from 'react-native-paper';

const MyComponent = () => (
  <View>
    <Checkbox.Item label="Item" status="checked" />
  </View>
);

export default MyComponent;

Props

status (required)
Type: 'checked' | 'unchecked' | 'indeterminate'

Status of checkbox.

disabled
Type: boolean

Whether checkbox is disabled.

label (required)
Type: string

Label to be displayed on the item.

onPress
Type: () => void

Function to execute on press.

uncheckedColor
Type: string

Custom color for unchecked checkbox.

color
Type: string

Custom color for checkbox.

style
Type: StyleProp<ViewStyle>

Additional styles for container View.

labelStyle
Type: StyleProp<TextStyle>

Style that is passed to Label element.

theme
Type: ReactNativePaper.Theme
testID
Type: string

testID to be used on tests.

position
Type: 'leading' | 'trailing'
Default value: 'trailing'

Checkbox control position.

mode
Type: 'android' | 'ios'

Whether <Checkbox.Android /> or <Checkbox.IOS /> should be used. Left undefined <Checkbox /> will be used.

Edit this page