Skip to content

Checkbox ​

Une case, ou un groupe de cases.

CheckboxGroup gère la liste des valeurs cochées; la case seule gère la sienne. L'état indéterminé est une troisième valeur, pas un entre-deux visuel : il dit « certains enfants sont cochés », ce qu'aucun booléen ne sait exprimer.

Installation ​

bash
sia-ui add checkbox

Ou par le paquet, sans rien copier :

tsx
import { Checkbox } from "@sia-ui/react-web";

Props ​

PropTypeDéfautDescription
classNamestring—
defaultValueCheckboxValue[][]
disabledboolean—
onValueChange(value: CheckboxValue[]) => void—
orientation"horizontal" | "vertical"vertical
size"sm" | "md" | "lg"md
toneComponentToneprimary
valueCheckboxValue[]—
variant"button" | "default"default

Voir aussi ​

Publié sous licence MIT.