ISelectionControlProps

interface
Form & Input

Props for <OrigamSelectionControl>, the base component shared by Checkbox, Switch, and Radio. Extends commons, a partial of the group props (excluding items), color, bgColor, active/hover state, and density, then adds individual control-level bindings: label, trueValue, falseValue, value, and required.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

label
string
Text label rendered beside the control.
trueValue
any
The value emitted when the control is checked/on. Defaults to true.
falseValue
any
The value emitted when the control is unchecked/off. Defaults to false.
value
any
The value contributed to a group modelValue when this control is checked (array mode).
required
boolean
Marks the input as required for native form validation.
disabled
boolean
activeColor
TColor
activeBgColor
TColor
error
string | boolean
name
string
readonly
boolean
type
string
modelValue
any
valueComparator
(a: any, b: any) => boolean
falseIcon
TIcon
trueIcon
TIcon
multiple
boolean
inline
boolean

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

A checkbox with custom true/false values

html