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

Type: 'checked' | 'unchecked' | 'indeterminate'

Status of checkbox.

Type: boolean

Whether checkbox is disabled.

Type: string

Label to be displayed on the item.

Type: (e: GestureResponderEvent) => void

Function to execute on press.

Type: string
Default value: label

Accessibility label for the touchable. This is read by the screen reader when the user taps the touchable.

Type: string

Custom color for unchecked checkbox.

Type: string

Custom color for checkbox.

Additional styles for container View.

Style that is passed to Label element.

labelVariant
Available in v5.x with theme version 3
Default value: 'bodyLarge'

Label text variant defines appropriate text styles for type role and its size. Available variants:

Display: displayLarge, displayMedium, displaySmall

Headline: headlineLarge, headlineMedium, headlineSmall

Title: titleLarge, titleMedium, titleSmall

Label: labelLarge, labelMedium, labelSmall

Body: bodyLarge, bodyMedium, bodySmall

Type: ThemeProp
Type: string

testID to be used on tests.

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

Checkbox control position.

Type: 'android' | 'ios'

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

Edit this page