RadioGroup
Un choix parmi plusieurs, tous visibles.
Au-delà de cinq ou six options, une liste déroulante lit mieux : des boutons radio en montrent la totalité, ce qui est leur intérêt tant qu'on peut encore les embrasser du regard.
Installation
bash
sia-ui add radio-groupOu par le paquet, sans rien copier :
tsx
import { RadioGroup, Radio, RadioButton } from "@sia-ui/react-web";Props de RadioGroup
| Prop | Type | Défaut | Description |
|---|---|---|---|
aria-describedby | string | — | |
aria-invalid | boolean | — | |
aria-labelledby | string | — | |
aria-required | boolean | — | |
className | string | — | |
defaultValue | RadioValue | — | |
disabled | boolean | — | |
id | string | — | |
label | ReactNode | — | |
name | string | — | |
onValueChange | (value: RadioValue) => void | — | |
orientation | "horizontal" | "vertical" | vertical | |
size | "sm" | "md" | "lg" | md | |
tone | ComponentTone | primary | |
value | RadioValue | — |
Props de Radio
| Prop | Type | Défaut | Description |
|---|---|---|---|
* value | RadioValue | — | |
label | ReactNode | — |
Props de RadioButton
| Prop | Type | Défaut | Description |
|---|---|---|---|
* value | RadioValue | — | |
className | string | — | |
disabled | boolean | — |
* obligatoire.
Voir aussi
- Le composant dans le catalogue — états, variantes, et bac à sable.
- La référence complète — tous les composants.