Skip to content

Radio Button

Use RadioButton to let shoppers select one option from a set of mutually exclusive choices. It renders a labeled radio input with optional secondary description text and an optional leading icon.

The SDK RadioButton showing a labeled radio option.
import { RadioButton } from '/@dropins/tools/components.js';
PropTypeReq?Description
labelstring | VNodeYesLabel shown beside the radio button.
namestringYesField name, used for mapping the value in a form.
valuestringYesField value.
size'medium' | 'large'NoSize of the label and description text. Defaults to medium.
checkedbooleanNoWhether the radio button is checked. Defaults to false.
disabledbooleanNoWhether the radio button is disabled. Defaults to false.
errorbooleanNoWhether the radio button is in an error state. Defaults to false.
descriptionstringNoAdditional secondary description text.
busybooleanNoWhether the radio button is busy. Defaults to false.
iconVNodeNoOptional icon to display before the label (SVG or img element).

RadioButton also accepts standard HTML attributes (for example, onChange, className), except size, label, and icon.

import { RadioButton, provider } from '/@dropins/tools/components.js';
await provider.render(RadioButton, {
name: 'shipping',
label: 'Free Shipping',
value: 'free-shipping',
description: 'Delivery in 5-7 business days',
})(document.querySelector('.radio-button'));
  • Toggle Button — a selectable button built on RadioButton.
  • Design tokens — the colors, spacing, and typography the radio button uses.