bit Bheadless

Progress / Meter

Report task completion with a progress bar, or a measurement within a known range with a meter.

Implementation: CSS Tailwind

Determinate progress

BitBhProgress renders role="progressbar" with aria-valuenow/min/max and a percentage aria-valuetext. It exposes --bit-bh-progress (a unitless 0–100 number) and data-state="loading|complete"; size the BitBhProgressIndicator with calc(var(--bit-bh-progress) * 1%). Name it with aria-labelledby.

Profile completion 60%

Simulated upload

A timer drives Value in megabytes against Max="8"; ValueText turns it into "2.4 of 8 MB uploaded" for screen readers. The upload starts with Value="null" (indeterminate) while "preparing". Template receives the computed percentage (double?) to draw the label inside the bar. The page implements IDisposable to stop the timer.

quarterly-report.pdf Ready
0%

Indeterminate

Leave Value unset (null) when the duration is unknown: aria-valuenow is omitted, data-state="indeterminate" is set and --bit-bh-progress is absent, so CSS can switch to an animation. Honor prefers-reduced-motion.

Syncing mailbox Waiting for the server…

Meter: disk usage

BitBhMeter (role="meter") shows a scalar within a known range — not task progress. Low and High split the range into data-level="low|optimum|high", and --bit-bh-meter (0–100) sizes the fill. ValueText gives a readable value.

  • System 231 of 256 GB
  • Projects 118 of 256 GB
  • Backup 37 of 256 GB

Meter: password strength

A 0–4 score with Low="2" and High="3": weak scores are low, fair ones optimum, a full score high. BitBhMeter's Template receives the percentage, used here to fill four segments.

Strength: Very weak
An unhandled error has occurred. Reload 🗙