Radio group

One choice among options: ray-radio (or ray-radio-card) elements inside a ray-radio-group, which is the form control.

Source on GitHub

Delivery, with a live total
Subtotal
$48.00
Delivery
$0.00
Total
$48.00

Arrives in 4–6 business days.

Cards: ray-radio-card in a ray-grid
Popular
Horizontal, colors and the outline variant
Light Dark System Hourly Daily Weekly S M L XL
Sizes
xs sm md lg xl
Required, in a form
A friend or a colleague A search engine A talk or a meetup Somewhere else
Send
Code

API

For AI agents: this API as Markdown, or every component in llms-full.txt.

<ray-radio-group>

Arrow keys move the selection, Tab enters and leaves the group.

PropertyAttributeTypeDefaultDescription
valuevaluestringValue of the checked radio. Initial: the value attribute, or a radio with the checked attribute.
namenamestringForm field name.
labellabelstringGroup label (also its accessible name).
descriptiondescriptionstringHelp text.
descriptionPositiondescription-position reflectsabove | belowaboveThe description before the control (help first) or after it, with the error (fields in a row stay aligned).
errorerrorstringError text.
requiredrequiredbooleanA choice is needed to submit.
disableddisabledbooleanDisables every radio.
orientationorientation reflectsvertical | horizontalverticalLayout of the radios.
sizesize reflectsxs | sm | md | lg | xlsmSize of every radio.
colorcolorstringChecked color of every radio.
variantvariant reflectsfilled | outlinefilledChecked look of every radio: filled circle, or colored ring and dot.
EventDescription
inputWhen the user picks a radio.
changeWhen the user picks a radio.
SlotDescription
(default)ray-radio or ray-radio-card elements (may be wrapped in layout elements: a ray-grid of cards).

<ray-radio>

PropertyAttributeTypeDefaultDescription
valuevalue reflectsstringValue given to the group when chosen.
checkedchecked (initial)booleanWhether this radio is the group's value; setting it sets the group's value. The checked attribute marks the group's initial value (when the group has no value attribute).
labellabelstringLabel text (or the content).
descriptiondescriptionstringHelp text under the label.
disableddisabledbooleanCannot be chosen.
colorcolorstringOverrides the group color.
sizesizexs | sm | md | lg | xlOverrides the group size.
variantvariant reflectsfilled | outlineOverrides the group variant.
SlotDescription
(default)Label content.
PartDescription
indicatorThe circle.
labelThe label.

<ray-radio-card>

A radio drawn as a card: a title (label), a detail (description), an icon, more content; checked, it takes the color's border and light background. Inside a ray-radio-group like a ray-radio (arrow keys, the form, required, disabled); put the cards in a ray-grid for columns.

PropertyAttributeTypeDefaultDescription
hideIndicatorhide-indicator reflectsbooleanNo radio circle: the card's border and background alone show the choice.
SlotDescription
(default)More content under the description.
iconAn icon before the title.
PartDescription
rootThe card.
iconAround the icon slot.