ISwitchTrackProps

interface
Forms & Inputs

Props for <OrigamSwitchTrack> — the rounded rail behind the thumb. Owns the visual surface (bgColor = rail, color = foreground/thumb intent) and exposes inset, error, disabled and readonly states.

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.

modelValue
boolean
Whether the switch is currently ON. Drives the --dirty modifier on the track.
isValid
boolean | null
Validation state forwarded from the surrounding <OrigamInput>.
disabled
boolean
Disabled state — applies the muted token and blocks pointer events.
readonly
boolean
Readonly state — keeps visual appearance but blocks input changes.
error
string | boolean
Error state — overrides the rail background with the danger token.
inset
boolean
Inset (Material) variant — taller, fully-rounded rail.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

Rendering a track in error state

html