SliderFieldTrack
Internal track sub-component of SliderField. Renders the background rail, the fill bar and optional tick marks. Not intended for standalone use.
Structure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<origam-slider-field-track> — 4 layers: root rail ①, background bar ②, fill bar ③ and tick marks ④.- 1.origam-slider-field-track
- Root element. Position: relative, border-radius: 9999px, pointer-events: none. Size set via --origam-slider-field-track---size.
- 2.origam-slider-field-track__background
- Rail background bar. Spans 100% in the track axis. Opacity 0.38 when a fill color is active (--opacity modifier). Animated via slider-field__track---transition.
- 3.origam-slider-field-track__fill
- Fill bar. Positioned from start% to stop% along the track axis using logical CSS properties.
- 4.origam-slider-field-track__ticks
- Tick container. Rendered only when showTicks is truthy and parsedTicks is non-empty. Children are .origam-slider-field-track__tick elements.
API
Props
All props accepted by this component, with their type, default value and description.
- startnumber0
- Fill bar start position as a percentage (0–100). Provided by the parent SliderField.
- stopnumber100
- Fill bar end position as a percentage (0–100). Provided by the parent SliderField.
- disabledbooleanfalse
- When true, color channels are set to undefined so the track renders in its disabled visual state (driven by the parent).
- errorbooleanfalse
- Forces both color channels to "danger". Driven by the parent slider error flag.
- minnumber0
- Minimum boundary — used to suppress the first/last tick marks.
- maxnumber100
- Maximum boundary — used to suppress the first/last tick marks.
- isVerticalbooleanfalse
- When true, switches logical CSS axis from inline to block (vertical orientation).
- indexFromEndbooleanfalse
- Inverts the start direction. Used when reverse=true or isVertical=true.
- Controls tick visibility. false = hidden, true = visible on hover/focus, "always" = always visible.
- tickSizenumber | string2
- Tick dot size in pixels. Sets --origam-slider-field-track__tick---size.
- ticks
- Pre-computed tick descriptor array. Parent SliderField owns the math and passes the result down.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- color
- Fill bar color. When error=true, overridden with "danger".
- bgColor
- Rail (background) color. When error=true, overridden with "danger".
- sizeTSize | number4
- Track thickness in pixels. Sets --origam-slider-field-track---size.
- Border-radius token applied to the track root and its background/fill children.
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
API
Slots
Content slots exposed by this component.
- #item
- Custom label for every tick mark. Receives the TTick descriptor and its index.
- #item.{index}
- Per-index tick label slot. Takes precedence over the generic item slot for that specific index.
API
Exposed members
Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.
- <T extends object>(props: T, exclude?: string[]) => Partial<T>
- Forwards a filtered subset of props to child components.
- Ref<string>
- Reactive CSS string generated by useStyle from computed track styles.
- string
- Unique style-sheet ID for this instance.
- () => void
- Injects the computed style sheet. Called automatically on mount.
- () => void
- Removes the injected style sheet. Called automatically on unmount.
- Ref<boolean>
- True once the style sheet has been injected.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- Track thickness. Set inline from the size prop. Default: 4 px.
- Tick dot size. Set inline from the tickSize prop. Default: 2 px.
- Transition applied to the background and fill bars. Driven by slider-field token slider-field.transition-duration.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
Notes
- pointer-events: none is set on the root so the track never intercepts thumb interactions. All keyboard and pointer handling lives in the parent SliderField.
- Under forced-colors (Windows High Contrast): the root receives a thin solid buttontext border, and background/fill use the highlight system color.
Foundation
Design tokens
Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.
- dimension4px
- Default track height / thickness.
- colorvar(--origam-color__surface---disabled)
- Rail background color.
- dimensionvar(--origam-radius---full)
- Border radius of the track (pill shape).
- dimension4px
- Tick dot size token.
- colorvar(--origam-color__text---disabled)
- Tick dot color in the unfilled zone.
- colorvar(--origam-color__action--primary---fg)
- Tick dot color in the filled zone.
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
This is an internal sub-part: it is injected by its parent component and cannot render on its own. See the parent component page for a live example.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Usage note
Ecosystem
Family
Components from the same folder that share conventions and often compose together.