Vanilla Breeze v0.7.4

Vanilla Breeze v0.7.4 released

0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…

Read the release notes

progress

Displays the completion progress of a task. Use for file uploads, form steps, loading states, or any operation with a known endpoint. For scalar measurements (like disk space), use meter instead.

When to Use

  • File upload progress
  • Download progress
  • Multi-step form completion
  • Loading states with known duration
  • Installation or setup progress

Use meter instead for static measurements like disk usage, battery level, or scores.

Basic Usage

A determinate progress bar shows completion percentage. Give every bar an accessible name: a <label for> pointing at the bar's id (<form-field> does not wire this up for you), or aria-label when there is no visible label.

Attributes

Attribute Purpose Default
value Current progress value Indeterminate if omitted
max Maximum value (completion) 1

Indeterminate Progress

Omit the value attribute for tasks with unknown duration. Shows an animated loading state.

The shimmer is drawn on the track in Chromium and Safari and on the full-width bar in Firefox. With prefers-reduced-motion: reduce or :root[data-motion-reduced] it slows down (1.5s to 4s) rather than stopping, because it is the only cue that work is still happening.

Size Variants

Different heights for various contexts. .xs is a hairline with no track border: use it only as decoration next to a text value, never as the only carrier of the value.

Color Variants

Semantic colors for different states or contexts. Each class only swaps the --progress-fill token, so it works on bars, rings and the retro themes alike. The light-mode warning fill uses --progress-fill-warning, a darkened warning that keeps 3:1 against the page. Colour alone never carries the state: say it in the label too.

Labeled Progress

Use the .labeled wrapper for a header row (label plus value) above the bar. The <label for> names the bar, and aria-describedby points at the <output> so the visible percentage is read with it. The styles apply only to .labeled wrappers with a direct <progress> child.

Recipes

Reading Progress Indicator

A fixed-position progress bar at the top of the page that tracks scroll position. Uses a single passive scroll listener and one property update. For a ready-made version (scroll-driven animation with a JS fallback, optional target element), use the <reading-progress> component.

Indeterminate as Skeleton Shimmer

An indeterminate <progress> (no value attribute) triggers the browser's native animation. Override the pseudo-element backgrounds for a shimmer effect — zero JS, zero extra DOM. See the skeleton loading pattern for the full approach using data-loading="skeleton".

Ring Mode

Add data-type="ring" to render a circular progress indicator. Without JavaScript, it renders as a standard linear bar (progressive enhancement). With JS, the progress-ring-init utility enhances it to a circle with an auto-synced center label.

A ring is still a <progress>: name it with aria-label or a <label for>. The center label is aria-hidden (the value is already exposed by the element). Like the bar, the ring has a 1px --progress-track-border outer edge (3:1), so the full circle stays visible; the remaining arc uses --progress-ring-track (default --progress-track-bg).

Ring Sizes

Use data-size for different ring diameters.

Ring Colors

Semantic color classes work on rings the same as linear bars.

Ring Indeterminate

Omit value for a spinning animation. No extra attributes needed — native indeterminate state is detected automatically. Under reduced motion the spin slows from 1s to 3s per turn. When an indeterminate ring later receives a value, the utility adds the center label then; removing value again hides it.

Custom Labels

By default, the center label shows the percentage. Use data-label to override it, or data-label="none" to hide it.

Ring Attributes

Attribute Values Description
data-type="ring" ring Enables circular mode
data-size xs, s, m, l, xl Ring diameter (default: m)
data-label text or none Override or hide center label

Ring Custom Properties

Property Default Description
--progress-ring-size 4em Ring diameter
--progress-ring-width 0.35em Track thickness
--progress-ring-track var(--progress-track-bg) Colour of the remaining arc

Updating with JavaScript

Just set the native value (or max) property — the JS utility auto-syncs the --progress custom property and center label via MutationObserver.

Progress vs Meter

Use progress Use meter
Tasks in progress Static measurements
File uploads, downloads Disk space, battery level
Has determinate/indeterminate states Has optimum value ranges
Value changes over time Value is a snapshot
No color change based on value Color changes based on optimum

Accessibility Notes

  • Name every bar: <label for="id"> or aria-label. A <label> that merely sits next to the bar (even inside <form-field>) is not associated with it
  • Describe the visible value: point aria-describedby at the <output> that shows "45%" or "Step 3 of 5"
  • Include fallback text: Content between the tags is shown when the element is not rendered as a bar
  • Announce milestones, not every tick: screen readers treat value changes inconsistently (NVDA beeps by default, others stay silent); put "Upload complete" in a live region (for example an <output>) rather than making the bar itself live
  • Visible extent: the track has a 3:1 border (--progress-track-border), so the remaining amount is visible without relying on the faint track fill
  • Forced colours: the bar opts out of the system palette and draws a Highlight fill on a Canvas track with a CanvasText edge (rings: Highlight on GrayText)
  • Reduced motion: indeterminate bars and rings slow down under prefers-reduced-motion and :root[data-motion-reduced]

CSS Reference

Abridged from src/native-elements/progress/styles.css (ring wrapper, reduced-motion and forced-colours rules omitted).

Related

  • meter — For scalar measurements (not progress)
  • output — Display progress values dynamically
  • label — Label for the progress element
  • reading-progress — Ready-made scroll reading indicator
↑