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.
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.
- modelValueboolean
- Whether the switch is currently ON. Drives the --dirty modifier on the track.
- isValidboolean | null
- Validation state forwarded from the surrounding <OrigamInput>.
- disabledboolean
- Disabled state — applies the muted token and blocks pointer events.
- readonlyboolean
- Readonly state — keeps visual appearance but blocks input changes.
- errorstring | boolean
- Error state — overrides the rail background with the danger token.
- insetboolean
- 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