Progress

Usage

Include CSS

Import Tailwind and one full Basecoat style bundle.

@import "tailwindcss";
@import "basecoat-css/vega.css";

Or import only the base CSS, Progress component CSS, and one style pack.

@import "tailwindcss";
@import "basecoat-css/base.css";
@import "basecoat-css/components/progress.css";
@import "basecoat-css/styles/vega.css";

Using CDN or bundler imports? See the Installation page.

Add your progress HTML

Add class="progress" and role="progressbar" to the root. Use one child <span> as the visual indicator.

<div class="progress" role="progressbar" aria-label="Loading" aria-valuenow="66" aria-valuemin="0" aria-valuemax="100">
  <span style="width: 66%"></span>
</div>

HTML structure

<div class=“progress” role=“progressbar”>
Progress root. Set aria-label or aria-labelledby, plus aria-valuenow, aria-valuemin, and aria-valuemax.
<span style=“width: …”>
Visual indicator. Its width should match the current value.

Examples

Label

66%

RTL

Progress supports dir="rtl" on the root or a parent.