Radio List @astryx-svelte/core v0.3.0 · 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.
ts
import { RadioList } from '@astryx-svelte/core';

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 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.
Don'tWrap a disabled RadioList in Tooltip to explain why it is disabled; disabled controls swallow the hover events the wrapper needs. Use the disabledMessage prop instead.

Examples

Common configurations, variations, and states.
RadioList — Horizontal Layout
Radio list with horizontal orientation for compact selections.
RadioList — Pricing Tier
Radio list with pricing info in end content for plan selection.
RadioList — With Descriptions
Radio list with descriptions on the group and each item.
RadioList — With Validation
Required radio list with an error message when nothing is selected.