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.
catalog/contracts/slider.ymlsource of truth · verbatim
$schema: https://thewyrdingway.dev/schemas/component-contract.schema.ymlcontractVersion: 0.1.0identity:name: Slidertag: wyrd-sliderpackage: wyrd.component.slidertitle: Slidersummary: Numeric range input with label, description, disabled state, clamped value behavior, and one canonical value-change event.relationships:related-to: - quality-parity-and-gatesclassification:category: form-fieldcomposition: multi-slotinteractive: truetarget-strategy:react: requiredflutter: requiredsurface:properties: - name: valuetype:kind: numberrequired: falsecontrolled: trueserializable: truesummary: Controlled numeric value. - name: default-valuetype:kind: numberrequired: falsedefault: 0serializable: truesummary: Initial uncontrolled numeric value. - name: mintype:kind: numberrequired: falsedefault: 0serializable: truesummary: Minimum allowed value. - name: maxtype:kind: numberrequired: falsedefault: 100serializable: truesummary: Maximum allowed value. - name: steptype:kind: numberrequired: falsedefault: 1serializable: truesummary: Increment used by native slider keyboard and pointer adjustment. - name: is-disabledtype:kind: booleanrequired: falsedefault: falsereflects: trueserializable: truesummary: Prevents changing value and exposes disabled platform semantics.slots: - name: labelrequired: truecardinality: exactly-oneaccepts: - textsummary: Visible label and accessible-name source. - name: descriptionrequired: falsecardinality: zero-or-oneaccepts: - textsummary: Help text associated with the slider.events: - name: value-changepayload:value:kind: numberaction:kind: action-refbubbles: truecomposed: truecancelable: falsesummary: Canonical value-change event carrying the next numeric value.states: - name: defaultsource: platformsummary: Enabled slider state. - name: focus-visiblesource: platformsummary: Keyboard-visible focus state. - name: disabledsource: propertysummary: Disabled state derived from is-disabled.parts: - name: rootsummary: Field container.slots: - label - description - name: labelsummary: Label text.slots: - label - name: controlsummary: Native range control. - name: descriptionsummary: Description text.slots: - descriptiontokens:root:gap: spacing.xslabel:color: color.on-surfacetext: typography.label-mdcontrol:accent: color.primarytrack: color.outlinethumb: color.primarydisabled-opacity: opacity.disableddescription:color: color.on-surface-varianttext: typography.body-mdmessages: []obligations:accessibility:role: slidername: Label slot provides the accessible name.description: Description slot is programmatically associated with the control.keyboard: - 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.semantics: - Current value, min, max, and disabled state are exposed through platform semantics.behavior:model: inputinteractions: - Changing the slider emits value-change with the next numeric value. - Disabled sliders do not change value or emit value-change. - Controlled value wins over default-value. - Value is clamped to the inclusive min and max range. - When step does not divide the range evenly, native platform slider semantics determine reachable intermediate values.hostEffects: - Dispatch value-change event. - Bind value to SDUI form state when present.conditions: - rtl - reduced-motion - cvd-deuteranopia - density-compact - text-expansionsdui:status: serializableserializableProperties: - value - default-value - min - max - step - is-disabledserializableSlots: - label - descriptioneventBindings: - value-changenotes: Value-change serializes to a named binding/action channel; native slider semantics decide reachable values when step does not divide the range evenly.examples: - name: defaultstate: defaultproperties:default-value: 25min: 0max: 100step: 5slots:label: Volumedescription: Set the playback volume. - name: high-volumestate: defaultproperties:default-value: 75min: 0max: 100step: 5slots:label: Volume - name: disabledstate: disabledproperties:value: 40is-disabled: trueslots:label: Volume
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.
Increment used by native slider keyboard and pointer adjustment.
is-disabled
boolean
false
Prevents changing value and exposes disabled platform semantics.
03
Slots & events
Slot
Cardinality
Accepts
Summary
label
exactly-one
text
Visible label and accessible-name source.
description
zero-or-one
text
Help text associated with the slider.
Event
Payload
Summary
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.
Binding
Token
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
State
Source
Summary
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.
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.