ProgressLinear
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…
indeterminateRendu de l’aperçu en cours…
bufferRendu de l’aperçu en cours…
roundedRendu de l’aperçu en cours…
thickStructure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<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.
- bufferValuenumber | string
- Secondary progress value (0-max). Shows a buffer zone when stream=true.
- clickablebooleanfalse
- Allows the user to click the bar to set the value. Maps the click X position to a normalised value.
- reversebooleanfalse
- Reverses the fill direction. Combined with RTL direction via useRtl.
- streambooleanfalse
- Renders an animated dot-stream beyond the buffer zone. Requires bufferValue.
- indeterminatebooleanfalse
- Activates the continuous bar animation. Overrides modelValue display.
- modelValuestring | number0
- Current progress value between 0 and max. Ignored in indeterminate mode.
- thicknessstring | number4
- Bar height in pixels. Sets both height and line-height inline.
- activebooleantrue
- When false, pauses animations (animation-play-state: paused).
- absolutebooleanfalse
- Positions the bar absolutely (position: absolute; left: 0).
- maxnumber | string100
- Maximum value used to normalise modelValue into a 0-100 percentage.
- stripedbooleanfalse
- Adds a stripe pattern to the foreground bar.
- labelstring'Loading'
- Accessible label (aria-label) for the progress bar.
- tagstring'div'
- Root HTML element.
- idstring
- classstring | Array<string> | object
- stylestring | 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.
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- Applies pill-shaped border-radius ({radius.full}) to the bar and loader.
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | 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:modelValueany
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
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.
- dimension100%
- Bar always fills its container width.
- dimensionvar(--origam-radius---full)
- Border radius used when rounded=true.
- durationvar(--origam-motion__duration---medium)
- Duration of width transitions in determinate mode.
- duration2200ms
- 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
Indeterminate
Buffer + stream
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.