Overview
Choose a single option among many.Import
Usage
Live Preview
Run Locally
npm run tsx:core-gallery
Props
- options: Array of
string— Radio options. - value?: number — Selected index.
- onChange?: (index: number, value: string) => void — Fires on selection.
- orientation?: ‘vertical’ | ‘horizontal’ — Layout direction.
- spacing?: number — Gap between buttons.
Methods
- setOptions(options), addOption(option), removeOption(index).
- setValue(index), getValue(), getSelectedIndex(), getSelectedText().
- setOrientation(dir), setSpacing(n), setOptionDisabled(index, bool).
- clearSelection(), isOptionSelected(index), getOptionCount().
Installation
Import
Quick Start
Production Examples
Best Practices
- Usa RadioGroup per scelte mutualmente esclusive; per multi-selezione preferisci MultiSelect.
