SliderFieldTrack

Form & Input
stable

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.

Anatomy of OrigamSliderFieldTrackSchematic of the slider track with background, fill and tick layers. 1 2 3 4 track root background fill (start→stop) tick marks
Anatomy of <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.

start
number
0
Fill bar start position as a percentage (0–100). Provided by the parent SliderField.
stop
number
100
Fill bar end position as a percentage (0–100). Provided by the parent SliderField.
disabled
boolean
false
When true, color channels are set to undefined so the track renders in its disabled visual state (driven by the parent).
error
boolean
false
Forces both color channels to "danger". Driven by the parent slider error flag.
min
number
0
Minimum boundary — used to suppress the first/last tick marks.
max
number
100
Maximum boundary — used to suppress the first/last tick marks.
isVertical
boolean
false
When true, switches logical CSS axis from inline to block (vertical orientation).
indexFromEnd
boolean
false
Inverts the start direction. Used when reverse=true or isVertical=true.
showTicks
false
Controls tick visibility. false = hidden, true = visible on hover/focus, "always" = always visible.
tickSize
number | string
2
Tick dot size in pixels. Sets --origam-slider-field-track__tick---size.
Pre-computed tick descriptor array. Parent SliderField owns the math and passes the result down.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
color
Fill bar color. When error=true, overridden with "danger".
bgColor
Rail (background) color. When error=true, overridden with "danger".
size
TSize | number
4
Track thickness in pixels. Sets --origam-slider-field-track---size.
Border-radius token applied to the track root and its background/fill children.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | 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.

Source
dimension
4px
Default track height / thickness.
color
var(--origam-color__surface---disabled)
Rail background color.
dimension
var(--origam-radius---full)
Border radius of the track (pill shape).
dimension
4px
Tick dot size token.
color
var(--origam-color__text---disabled)
Tick dot color in the unfilled zone.
color
var(--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

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.