RadioButton.Item

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

Usage

import * as React from 'react';
import { View } from 'react-native';
import { RadioButton, Text } from 'react-native-paper';

export default class MyComponent extends React.Component {
  state = {
    value: 'first',
  };

  render() {
    return(
      <RadioButton.Group
        onValueChange={value => this.setState({ value })}
        value={this.state.value}
      >
          <RadioButton.Item label="First item" value="first" />
          <RadioButton.Item label="Second item" value="second" />
      </RadioButton.Group>
    )
  }
}

Props

value (required)
Type: string

Value of the radio button.

label (required)
Type: string

Label to be displayed on the item.

onPress
Type: () => void

Function to execute on press.

status
Type: 'checked' | 'unchecked'

Status of radio button.

style
Type: StyleProp<ViewStyle>

Additional styles for container View.

labelStyle
Type: StyleProp<TextStyle>

Style that is passed to Label element.