ProgressLinear
Horizontal progress bar with determinate, indeterminate, buffer, stream and clickable modes.
Preview
Rendering the live preview…
determinate 40%Rendering the live preview…
indeterminateRendering the live preview…
bufferRendering the live preview…
roundedRendering the live preview…
thickStructure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<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
All props accepted by this component, with their type, default value and 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
Content slots exposed by this component.
- #default
- Content overlaid on the bar (e.g. a label). Slot props: normalised value (0-100) and normalised buffer value.
API
Emits
Events emitted by this component.
- @update:modelValueany
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>
- 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.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- Background track color. Inherits from bgColor prop via useTextColor.
- Background track opacity.
- Foreground bar color. Inherits from color prop via useTextColor.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
ARIA roles
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.
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.
- 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.
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Determinate
Indeterminate
Buffer + stream
Ecosystem
Family
Components from the same folder that share conventions and often compose together.