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

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Emplacements de contenu exposés par ce composant.

#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

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Sous-partie interne : elle est injectée par son composant parent et ne peut pas se rendre seule. Voir la fiche du composant parent pour un exemple vivant.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Usage note

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.