Skip to contentSkip to navigationSkip to topbar
Paste assistant Assistant
Figma
Star

Radio Group

Version 13.1.1GithubStorybook

A Radio Group is a form element that lets users select a single choice from a list of at least two options.

Installation

Installation page anchor
yarn add @twilio-paste/radio-group - or - yarn add @twilio-paste/core
import {Radio, RadioGroup} from '@twilio-paste/core/radio-group';

const Component = () => (
  <RadioGroup name="foo" value="foo" legend="foo" onChange={NOOP}>
    <Radio id="foo" value="foo" name="foo">
      Foo
    </Radio>
  </RadioGroup>
);

Radio

Radio page anchor

checked

Sets the Radio Button as checked

Type
boolean

defaultChecked

Sets the Radio Button as the default checked option

Type
boolean

disabled

Make the Radio Button disabled

Type
boolean

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
any
Default
RADIO

hasError

Adds an error state to the Radio Button

Type
boolean

helpText

Provides additional help text for the Radio Button

Type
| string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal

id

ID for the Radio Button

Type
string

name

Name for the Radio Button Group

Type
string

value

Value for the Radio Button

Type
string

name RequiredRequired

Name for the Radio Button Group

Type
string

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
any
Default
RADIO_GROUP

i18nRequiredLabel

Label text for the required dot in the legend

Type
string
Default
(required)

onChange

Pass a function for the onChange handler

Type
(value: string) => void

value

Value for the Radio Button Group

Type
string