Skip to main content

Radio Button

Radio buttons allow users to select only one option from a group of choices.

Vector icon

Usage

import React, { ReactElement, useState } from "react";

import { List, Radio } from "./components";

const Example = (): ReactElement => {
const [value, setValue] = useState("card");
return (
<Radio
value={value}
onValueChange={(val) => {
setValue(val);
}}
>
<List.Item title="Card" left={() => <Radio.RadioButton value="card" />} />
<List.Item title="UPI" left={() => <Radio.RadioButton value="upi" />} />
</Radio>
);
};

export default Example;

Props

value(required)

Type: string

Value of the radio button

status

Type: 'checked' | 'unchecked'

Status of radio button.

disabled

Type: boolean

Whether radio is disabled.

onPress

Type: (e: GestureResponderEvent) => void

Function to execute on press.