form-field — wyrd.component.slider

Slider

Numeric range input with label, description, disabled state, clamped value behavior, and one canonical value-change event.

Install @wyrd-company/react or the Flutter package and use it directly — your DESIGN.md does the styling.

01

Examples

Generated from the contract's examples block. Previews are the published @wyrd-company/react component, themed by the brand's role tokens — flip the site's light/dark toggle and they follow.

Code target Applies to every example on component pages.
default state: default

Set the playback volume.

Usage
import { WyrdSlider } from "@wyrd-company/react";

<WyrdSlider defaultValue={25} min={0} max={100} step={5} label="Volume" description="Set the playback volume." />

// events: onValueChange
high-volume state: default
Usage
import { WyrdSlider } from "@wyrd-company/react";

<WyrdSlider defaultValue={75} min={0} max={100} step={5} label="Volume" />

// events: onValueChange
disabled state: disabled
Usage
import { WyrdSlider } from "@wyrd-company/react";

<WyrdSlider value={40} isDisabled label="Volume" />

// events: onValueChange
02

Properties

NameTypeDefaultSummary
value number undefined Controlled numeric value.
default-value number 0 Initial uncontrolled numeric value.
min number 0 Minimum allowed value.
max number 100 Maximum allowed value.
step number 1 Increment used by native slider keyboard and pointer adjustment.
is-disabled boolean false Prevents changing value and exposes disabled platform semantics.
03

Slots & events

SlotCardinalityAcceptsSummary
label exactly-one text Visible label and accessible-name source.
description zero-or-one text Help text associated with the slider.
EventPayloadSummary
value-change value, action Canonical value-change event carrying the next numeric value.
04

Tokens

The contract's token bindings. Open the shared contextual sidebar from any example; primary swatches reflect the color you pick there. Error swatches show the active preset's values; editing any knob switches to custom and resets error to TWW · Ink.

BindingToken
root.gap spacing.xs
label.color color.on-surface
label.text typography.label-md
control.accent color.primary
control.track color.outline
control.thumb color.primary
control.disabled-opacity opacity.disabled
description.color color.on-surface-variant
description.text typography.body-md
05

States

StateSourceSummary
default platform Enabled slider state.
focus-visible platform Keyboard-visible focus state.
disabled property Disabled state derived from is-disabled.
06

Accessibility

From the contract's accessibility obligations. Role slider; Label slot provides the accessible name.

  • Arrow keys adjust the value by step according to platform behavior.
  • Home moves value to min.
  • End moves value to max.
  • Tab moves focus into and out of the slider in document order.
  • Current value, min, max, and disabled state are exposed through platform semantics.
  • Verified under: rtl, reduced-motion, cvd-deuteranopia, density-compact, text-expansion.
07

SDUI

Status: serializable. Value-change serializes to a named binding/action channel; native slider semantics decide reachable values when step does not divide the range evenly.

SerializableMembers
Propertiesvalue, default-value, min, max, step, is-disabled
Slotslabel, description
Eventsvalue-change
The Wyrding Way — a contract-first design system. © Wyrd Company