ProgressLinear

Feedback & Status
stable

Horizontal progress bar with determinate, indeterminate, buffer, stream and clickable modes.

Aperçu

Rendu de l’aperçu en cours…

determinate 40%

Rendu de l’aperçu en cours…

indeterminate

Rendu de l’aperçu en cours…

buffer

Rendu de l’aperçu en cours…

rounded

Rendu de l’aperçu en cours…

thick

Structure

Anatomie

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

Anatomy of OrigamProgressLinearSchematic of the ProgressLinear component with 5 numbered internal parts. 1 2 3 4 5 ① root wrapper (div.origam-progress--linear) ② div.origam-progress__background (track) ③ div.origam-progress__loader > __bar ④ div.origam-progress__stream (buffer dots) ⑤ div.origam-progress__content (slot)
Anatomy of <origam-progress-linear> — 5 internal parts: root ①, background track ②, foreground bar ③, stream indicator ④ (buffer mode only), and content slot ⑤.
1.origam-progress--linear
Root element. overflow: hidden; position: relative; width: 100%. Height set inline from thickness prop.
2.origam-progress__background
Background track — absolute, full-width until buffer narrows it. Color from bgColor prop via useTextColor, opacity 0.5.
3.origam-progress__loader > .origam-progress__bar
Foreground loader container + bar(s). In indeterminate mode two bars (--long and --short) animate simultaneously. Width driven by normalised value in determinate mode.
4.origam-progress__stream
Animated dot-stream rendered only when stream=true. Positioned after the buffer zone. Opacity: 0.3.
5.origam-progress__content
Absolute overlay for the #default slot. Rendered only when hasContent is true.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

bufferValue
number | string
Secondary progress value (0-max). Shows a buffer zone when stream=true.
clickable
boolean
false
Allows the user to click the bar to set the value. Maps the click X position to a normalised value.
reverse
boolean
false
Reverses the fill direction. Combined with RTL direction via useRtl.
stream
boolean
false
Renders an animated dot-stream beyond the buffer zone. Requires bufferValue.
indeterminate
boolean
false
Activates the continuous bar animation. Overrides modelValue display.
modelValue
string | number
0
Current progress value between 0 and max. Ignored in indeterminate mode.
thickness
string | number
4
Bar height in pixels. Sets both height and line-height inline.
active
boolean
true
When false, pauses animations (animation-play-state: paused).
absolute
boolean
false
Positions the bar absolutely (position: absolute; left: 0).
max
number | string
100
Maximum value used to normalise modelValue into a 0-100 percentage.
striped
boolean
false
Adds a stripe pattern to the foreground bar.
label
string
'Loading'
Accessible label (aria-label) for the progress bar.
tag
string
'div'
Root HTML element.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
color
Foreground bar color. Accepts intent tokens or a CSS color.
bgColor
Background track color. Defaults to currentColor at 50% opacity.
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
Applies pill-shaped border-radius ({radius.full}) to the bar and loader.
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
location
Positional anchor: top or bottom. Sets top:0 or bottom:0 when absolute/fixed.

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Content overlaid on the bar (e.g. a label). Slot props: normalised value (0-100) and normalised buffer value.

API

Emits

Événements émis par ce composant.

@update:modelValue
any

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>
Utility to forward a filtered subset of props.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet.
() => void
Removes the injected style sheet.
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.

Background track color. Inherits from bgColor prop via useTextColor.
Background track opacity.
Foreground bar color. Inherits from color prop via useTextColor.

Inclusion

Accessibilité

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

Rôles ARIA

progressbar

Notes

  • role="progressbar" is applied by the progress composable along with aria-valuenow, aria-valuemin (0) and aria-valuemax.
  • Pass the label prop with a localised string to set aria-label. Defaults to "Loading".
  • When clickable=true, the bar is interactive. Ensure an aria-label describes what clicking does (e.g. "Seek video").
  • Under prefers-reduced-motion: reduce, indeterminate bars are frozen at 50% width and streams stop animating.

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
100%
Bar always fills its container width.
dimension
var(--origam-radius---full)
Border radius used when rounded=true.
duration
var(--origam-motion__duration---medium)
Duration of width transitions in determinate mode.
duration
2200ms
Duration of the indeterminate bar CSS animations.

Interactif

Playground

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

Rendu de l’aperçu en cours…

Usage

Exemples

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

Determinate

vue

Indeterminate

vue

Buffer + stream

vue

Écosystème

Famille

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