Skip to content

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-group

Ou par le paquet, sans rien copier :

tsx
import { RadioGroup, Radio, RadioButton } from "@sia-ui/react-web";

Props de RadioGroup ​

PropTypeDéfautDescription
aria-describedbystring—
aria-invalidboolean—
aria-labelledbystring—
aria-requiredboolean—
classNamestring—
defaultValueRadioValue—
disabledboolean—
idstring—
labelReactNode—
namestring—
onValueChange(value: RadioValue) => void—
orientation"horizontal" | "vertical"vertical
size"sm" | "md" | "lg"md
toneComponentToneprimary
valueRadioValue—

Props de Radio ​

PropTypeDéfautDescription
* valueRadioValue—
labelReactNode—

Props de RadioButton ​

PropTypeDéfautDescription
* valueRadioValue—
classNamestring—
disabledboolean—

* obligatoire.

Voir aussi ​

Publié sous licence MIT.