Progress Bar overview
Headless progress bar gives you range semantics and ARIA wiring, while the track, fill, labels, and motion remain fully owner-authored.
Imports
Use the primitive directives when you want to own the surrounding markup and visuals.
Primitive import
ts
import { TngProgressBar, TngProgressBarIndicator } from '@tailng-ui/primitives';
Basic composition
The root owns the semantic range. The indicator is just a structural part, so you control width for determinate states and motion for indeterminate ones.
Minimal headless markup
html
<div tngProgressBar [min]="0" [max]="100" [value]="72" class="progress-track">
<span tngProgressBarIndicator class="progress-indicator" [style.width.%]="72"></span>
</div>
<div tngProgressBar [indeterminate]="true" aria-label="Loading report" class="progress-track">
<span tngProgressBarIndicator class="progress-indicator progress-indicator--indeterminate"></span>
</div>
Style variants
Use the same primitives inside a lightweight CSS shell or a utility-authored Tailwind surface.
Headless progress bar (plain CSS)
Headless progress bar (Tailwind)
Range semantics
min,max, andvalueare normalized and clamped on the root directive.- Indeterminate mode removes
aria-valuenow,aria-valuemin, andaria-valuemax. - The indicator width is entirely owner-authored in headless mode.
- Provide clear context through nearby copy or
aria-labelwhen the task is not obvious.