Logo

RadioButton.Item

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

Pressed

Usage

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

const MyComponent = () => {
  const [value, setValue] = React.useState('first');

  return (
    <RadioButton.Group onValueChange={value => setValue(value)} value={value}>
      <RadioButton.Item label="First item" value="first" />
      <RadioButton.Item label="Second item" value="second" />
    </RadioButton.Group>
  );
};

export default MyComponent;

Props

value (required)
Type: string

Value of the radio button.

label (required)
Type: string

Label to be displayed on the item.

disabled
Type: boolean

Whether radio is disabled.

onPress
Type: () => void

Function to execute on press.

accessibilityLabel
Type: string

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

uncheckedColor
Type: string

Custom color for unchecked radio.

color
Type: string

Custom color for radio.

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.

theme
Type: Theme
Edit this page