Skip to content
v1.0.3

Progress

A linear progress bar — determinate (value/max) or an indeterminate animated state for unknown-duration work. Three heights, four tones, with an optional label and percentage.

bash
jlds add progress

Usage

html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jarooda/jlds@main/registry/css/index.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jarooda/jlds@main/registry/css/progress.css">

<div class="jl-progress jl-progress--md jl-progress--brand">
  <div class="jl-progress__track" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
    <div class="jl-progress__fill" style="width: 60%"></div>
  </div>
</div>
vue
<script setup lang="ts">
import { Progress } from "@/components/ui/progress"
</script>

<template>
  <Progress :value="60" />
</template>
tsx
import { Progress } from "@/components/ui/progress"

<Progress value={60} />

Label & value

Add a label and/or showValue for a meta row above the bar.

html
<div class="jl-progress jl-progress--md jl-progress--brand">
  <div class="jl-progress__meta">
    <span class="jl-progress__label">Uploading…</span>
    <span class="jl-progress__value">72%</span>
  </div>
  <div class="jl-progress__track" role="progressbar" aria-valuenow="72" aria-valuemin="0" aria-valuemax="100">
    <div class="jl-progress__fill" style="width: 72%"></div>
  </div>
</div>
vue
<template>
  <Progress :value="72" label="Uploading…" show-value />
</template>
tsx
<Progress value={72} label="Uploading…" showValue />

Tones & sizes

Tones: brand (default) · success · warning · danger. Sizes: sm · md · lg.

html
<div class="jl-progress jl-progress--sm jl-progress--success">
  <div class="jl-progress__track"><div class="jl-progress__fill" style="width: 100%"></div></div>
</div>
<div class="jl-progress jl-progress--md jl-progress--warning">
  <div class="jl-progress__track"><div class="jl-progress__fill" style="width: 45%"></div></div>
</div>
<div class="jl-progress jl-progress--lg jl-progress--danger">
  <div class="jl-progress__track"><div class="jl-progress__fill" style="width: 20%"></div></div>
</div>
vue
<template>
  <Progress :value="100" tone="success" size="sm" />
  <Progress :value="45" tone="warning" size="md" />
  <Progress :value="20" tone="danger" size="lg" />
</template>
tsx
<Progress value={100} tone="success" size="sm" />
<Progress value={45} tone="warning" size="md" />
<Progress value={20} tone="danger" size="lg" />

Indeterminate

For work of unknown duration, set indeterminate — the fill animates across the track.

html
<div class="jl-progress jl-progress--md jl-progress--brand">
  <div class="jl-progress__track jl-progress__track--indeterminate" role="progressbar">
    <div class="jl-progress__fill"></div>
  </div>
</div>
vue
<template>
  <Progress indeterminate />
</template>
tsx
<Progress indeterminate />

Props

React

Progress extends React.HTMLAttributes<HTMLDivElement>.

PropTypeDefaultDescription
valuenumber0Current value
maxnumber100Maximum value
size"sm" | "md" | "lg""md"Track height
tone"brand" | "success" | "warning" | "danger""brand"Fill color
labelReact.ReactNodeLabel shown above the bar
showValuebooleanfalseShow the rounded percentage
indeterminatebooleanfalseAnimated unknown-duration state

Vue

Same props (label is a string).

CSS classes (HTML)

ClassPurpose
.jl-progressWrapper — always required
.jl-progress--sm / --md / --lgTrack height
.jl-progress--brand / --success / --warning / --dangerFill tone
.jl-progress__meta / __label / __valueOptional label/percentage row
.jl-progress__trackThe track (set role="progressbar" + aria-value*)
.jl-progress__fillThe fill — set width inline for determinate
.jl-progress__track--indeterminateAnimated indeterminate state