Skip to content

GhostProgress ​

GhostProgress is a determinate progress indicator with an indeterminate fallback. Import it from @ghostvue/themes for the default track and fill. The consumer owns value; the primitive does not start, cancel, or announce the result of asynchronous work. For headless progressbar semantics with your own styles, see Advanced: headless composition.

Use this when percent-complete is known. GhostSpinner is the compact status for work with no percent; GhostSkeleton is the silent layout placeholder. The distinction is the contract, not a runtime dependency.

Artifact upload queue ​

Artifact upload queue

Determinate, custom-valueText, and indeterminate progress bars inside an upload queue card.

Artifact uploads 2 transfers in progress, 1 verifying checksum
tokens-bundle.tar.gz65%
visual-baselines.zip 7 of 10 shards
manifest-signatures.jsonVerifying…

An upload queue card built from @ghostvue/themes combines determinate percent progress, custom valueText for shard counts, and an indeterminate bar when the total is unknown.

From unknown to known progress ​

Report export

Indeterminate while rows are counted, then determinate with row-count value text.

Export billing report

November invoices as CSV. The bar shows a value once the row count is known.

billing-2026-11.csvCounting rows…

When the current value is unknown, omit value (or pass null). The bar keeps role="progressbar" and aria-valuemax but drops aria-valuenow / aria-valuetext and sets data-state="indeterminate", and the themed recipe sweeps the fill. As soon as the total is known, pass a number: the same bar becomes determinate and fills to value / max. Press Finish counting, then Export next batch, to walk the export from counting rows to done, and Start new export to return to the unknown total. The bar itself is not a live region, so the visible status line beside the file name carries role="status" and announces each phase.

Custom value text ​

The default value text is the rounded percent of max (default 100). Pass max in the task's own unit and valueText when a count reads better than a percent: the export bar sets max to the row total and announces "480 of 960 rows" instead of "50%". valueText is ignored while the bar is indeterminate, so show the pending state in visible text, as "Counting rows…" does.

Pass label so the bar has an accessible name (aria-label). The root is a <div role="progressbar">, and its contents cannot name it.

Sizes and tones ​

Themed

Track thickness and tone on the @ghostvue/themes wrapper.

Importing the themed component loads the default stylesheet. Visual props exist only on this wrapper:

@ghostvue/themes adds these to the headless GhostProgress API, which it forwards:

PropTypeDefaultDescription
tone'accent' | 'neutral' | 'danger' | 'success' | 'warning'"accent"Semantic color intent. success and warning fill with the status tokens, as on GhostBadge; there is no info tone. With success or warning, also say the status in text (label, valueText, or visible copy linked with aria-describedby): color alone is not enough. The default omits data-tone so CSS can treat a missing hook as accent.
size'sm' | 'md' | 'lg'"md"Track thickness. The default omits data-size so CSS can treat a missing hook as md.

Defaults omit data-size / data-tone so CSS can treat a missing hook as md / accent. Thickness uses --ghost-track-thickness-sm / md / lg (4 / 6 / 8px at every density and theme, so sm stays visible under compact Calm). Fill uses --ghost-action-*-bg for accent, neutral, and danger, and --ghost-status-success-fg / --ghost-status-warning-fg for the status tones. The track is --ghost-border-default.

Status tones ​

Sync jobs

Success and warning bars, determinate and indeterminate, each saying its status in text.

Sync jobs

  • Nightly backup72%, on track
  • Verifying checksums Healthy, no mismatches so far
  • Syncing files Behind schedule, 1,240 of 3,100 files
  • Reconnecting to storageRetrying, attempt 3 of 5

tone picks a color for the task's state. Choose the one that matches it:

  • success for a task that is on track, such as a backup running cleanly.
  • warning for one that is behind schedule or retrying.
  • danger for one that failed.
  • accent (the default) or neutral when the bar shows no state.

Do not use accent to mean success. It follows the brand color, so it turns purple in Vibrant and is close to neutral in Mono. success and warning use the same status tokens as GhostBadge, so a bar and a status badge beside it match. There is no info tone.

Progress is for tasks that finish. Storage used against a quota, or any other measurement, is not progress, and a status tone does not make it one.

Say the status in text. Color must not be the only cue, and the component cannot add the words for you: an indeterminate bar has no value text, and a determinate bar announces a percent. With success or warning, put the status in at least one of these places:

  • the accessible name: label="Syncing files, retrying", or aria-labelledby pointing at visible text;
  • valueText on a determinate bar: value-text="40%, behind schedule";
  • visible copy next to the bar, linked with aria-describedby.

label="Syncing files" with tone="warning" and nothing else is not enough: a screen reader hears "Syncing files" and never learns the job is behind. label="Syncing files, retrying" is.

Across the bundled themes, a value update takes 120 ms and an indeterminate sweep takes 700 ms. Under prefers-reduced-motion: reduce, the update takes 80 ms and the sweep becomes an opacity pulse with the same 700 ms period as GhostSpinner. For success and warning, the pulse dips only to 80% opacity, so the fill keeps at least 3:1 against the track on every frame.

You can also import the stylesheet and wrap unstyled progress bars in .ghost-theme when you want a region of headless components to pick up the defaults. See the default theme guide.

Progress vs Spinner vs Skeleton ​

NeedPrimitive
Known percent-complete of a taskGhostProgress
Compact pending status, duration unknownGhostSpinner
Unready layout that must not speakGhostSkeleton

Do not put aria-busy on the progressbar itself. Busy belongs on the surrounding region when the workflow should announce.

Accessibility and environment behavior ​

Assistive technology encounters a named progressbar. Determinate instances expose aria-valuemin="0", aria-valuemax, aria-valuenow, and aria-valuetext. Indeterminate instances omit now/text because the value is unknown. The component is not a live region and does not announce every tick.

The bar is not focusable and adds no keyboard handling. Native <progress> is not used: it is a replaced element and cannot host data-part="indicator" or a tokenized reduced-motion recipe. See the spec for the full justification.

SSR markup is deterministic from props. Reduced motion is a CSS media query, not a client-only JavaScript branch.

See the GhostProgress specification for the complete behavior and compatibility contract.

Advanced: headless composition ​

For teams that bring their own design system, the headless GhostProgress from @ghostvue/vue renders the same progressbar with no styles. Each example below carries the consumer CSS it needs, using system colors so it works without a theme.

Basic use ​

Basic Headless

Named determinate progressbar with value and max.

value and max set aria-valuenow / aria-valuemax, and the default value text is the rounded percent.

Composable ​

Composable Headless

Same contract as GhostProgress, applied to a native host.

useGhostProgress returns rootProps and indicatorProps for elements you already render.

Headless indeterminate ​

Indeterminate Headless

Fallback when the current value is unknown.

The headless bar has no sweep animation, so the sample paints a static partial fill while the value is unknown.

Headless value text ​

Value text Headless

Custom accessible value text instead of a percent.

Styling ​

The unstyled component renders a root with class ghost-progress and data-part="root", plus an indicator with data-part="indicator". Determinate fill size is the indicator's inline inline-size percentage. data-state="indeterminate" is present only while the value is unknown.

css
.ghost-progress[data-state='indeterminate'] [data-part='indicator'] {
  /* Applies only to the unknown-value fallback. */
}

The themed wrapper's .ghost-themed-scope span is display: contents and is not a layout surface. Do not target internal wrapper nesting. There is no pt passthrough object.

API ​

PropTypeDefaultDescription
labelstring—Accessible name applied as aria-label. role=progressbar is nameFrom author; contents are presentational and cannot name the widget.
maxnumber100Exclusive upper bound of the range. Defaults to 100 (ARIA progressbar valuemax), not HTML progress's 1. Invalid values fall back to 100.
valuenull | number—Current progress in the same unit as max. Omit or pass null for the indeterminate fallback. Non-finite numbers are treated as unknown. Finite values are clamped to [0, max].
valueTextstring—Accessible value text (aria-valuetext) for determinate instances. When omitted, the default is the rounded percent. Ignored while indeterminate.

Native attributes and listeners fall through to the progressbar root. There is no default slot, no v-model, and no exposed ref. The fill is data-part="indicator", not a Vue slot.