RyzeDeskRyzeDesk

Stripe

4105 articles

Radio component for Stripe Apps


Radio component for Stripe Apps

Use Radios to make a selection from a mutually exclusive set of options.

SDK version

To add the Radio component to your app:

Loading example...

<Radio label="This is a Radio." />

Radio props

PropertyType
autoFocusOptional boolean | undefined If true, React will focus the element on mount.
checkedOptional boolean | undefined Controls whether the input is selected. When you pass this prop, you must also pass an onChange handler that updates the passed value.
defaultCheckedOptional boolean | undefined Specifies the initial value that a user can change.
descriptionOptional string | undefined Descriptive text that will be rendered adjacent to the control’s label.
disabledOptional boolean | undefined Sets whether the element should be disabled. Prevents selection.
errorOptional string | undefined Error text that will be rendered below the control.
formOptional string | undefined Specifies the id of the <form> this input belongs to. If omitted, it’s the closest parent form.
hiddenElementsOptional ("label" | "description" | "error")[] | undefined Visually hides the specified elements. The hidden elements will still be present and visible to screen readers.
invalidOptional boolean | undefined Sets whether the element is in an invalid state. This is a display-only property, and will not prevent form submission.
labelOptional React.ReactNode Text that describes the control. Will be both visible and clickable.
nameOptional string | undefined Used to collect multiple Radios into a single, mutually exclusive group, for uncontrolled use cases.
onChangeOptional ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined Required for controlled inputs. Fires immediately when the input’s value is changed by the user (for example, it fires on every keystroke). Behaves like the browser input event.
readOnlyOptional boolean | undefined If true, the input is not editable by the user.
requiredOptional boolean | undefined If true, the value must be provided for the form to submit.
tabIndexOptional number | undefined Overrides the default tab key behaviour. Avoid using values other than -1 and 0.
valueOptional string | undefined Controls the input’s text. When you pass this prop, you must also pass an onChange handler that updates the passed value.

Disabled

You can disable a Radio component, which prevents changes.

Loading example...

<Radio name="group" label="Ah ah ah" disabled />
<Radio
 name="group"
 disabled
 defaultChecked
 label="You didn't say the magic word"
/>

Invalid

Radio can be invalid.

Loading example...

<Radio label="This is an invalid input" invalid />

State management

Use the Radio component as an uncontrolled input:

Loading example...

<Radio
 name="group"
 label="Have some of Column A"
 onChange={(e) => {
 console.log(e.target.checked);
 }}
/>
<Radio
 name="group"
 label="Try all of Column B"
 onChange={(e) => {
 console.log(e.target.checked);
 }}
/>

See also

Last verified 2026-09-27

Is this helpful?