XDSRadioListItem@xds/core · RadioList

Usage

A group of options where only one can be selected at a time. All options are visible at once, making it easy to compare choices. Use it when users need to pick one option from a small set.

Best practices

GuidancePractices
DoKeep the number of options small — typically 2 to 7 choices.
DoUse clear, concise labels that differentiate each option at a glance.
DoPre-select a default option when there's a sensible default — don't leave the group empty unless the choice is truly optional.
Don'tUse when multiple selections are needed — use CheckboxList instead.
Don'tUse for long lists — use Selector for better discoverability.
Don'tUse horizontal layout with more than 4 options — it wraps awkwardly.

Anatomy

ElementDescription
HeaderOptional heading above the radio list.
ChildrenrequiredThe radio list items rendered as selectable options.
Label/ValuerequiredThe text label and associated value for each radio item.

Import

ts
import {XDSRadioListItem} from '@xds/core/RadioList'

Props

PropTypeDescription
labelrequired
stringLabel text for the radio item.
valuerequired
stringValue of this radio item.
description
stringDescription text displayed below the label.
isDisabled
boolean (default: false)Whether this individual radio item is disabled.
startContent
ReactNodeContent to render before the radio circle.
endContent
ReactNodeContent to render after the label.

Showcase source

tsx
'use client';
import {useState} from 'react';
import {XDSRadioList, XDSRadioListItem} from '@xds/core/RadioList';
export default function RadioListItemShowcase() {
const [value, setValue] = useState('standard');
return (
<XDSRadioList label="Shipping method" value={value} onChange={setValue}>
<XDSRadioListItem
label="Standard"
value="standard"
description="5–7 business days"
/>
<XDSRadioListItem
label="Express"
value="express"
description="2–3 business days"
/>
<XDSRadioListItem
label="Overnight"
value="overnight"
description="Next business day"
/>
<XDSRadioListItem
label="Same day"
value="sameday"
description="Not available in your area"
isDisabled
/>
</XDSRadioList>
);
}