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

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

Every property declared by this interface, with its type, optionality and default.

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.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Rendering a track in error state

html