Progress Circle
Circular indicator that scales from compact inline counters to large hero displays
<div class="nds-progress-circle nds-lg" data-value="75">
<svg width="120" height="120" viewBox="0 0 24 24">
<circle class="nds-progress-bg" cx="12" cy="12" r="10" fill="none" stroke-width="2" />
<circle class="nds-progress-track" cx="12" cy="12" r="10" fill="none" stroke-width="2"
stroke-dasharray="62.83" stroke-dashoffset="62.83" stroke-linecap="round" />
</svg>
<div class="nds-progress-info">
<span class="nds-feedback nds-sm">
<span class="nds-feedback-icon"><i class="nds-icon" aria-hidden="true"></i></span>
</span>
<span class="nds-progress-percentage">
<span class="nds-progress-number"></span>
<span class="nds-progress-symbol">%</span>
</span>
<span class="nds-progress-text">Active users</span>
</div>
</div>
Progress Circle — Out of
Displays a value as a fraction (e.g. 3.75/5) instead of a percentage, ideal for GPA, ratings, and score displays
<div class="nds-progress-circle nds-lg" data-num="3.75" data-max="5">
<svg width="120" height="120" viewBox="0 0 24 24">
<circle class="nds-progress-bg" cx="12" cy="12" r="10" fill="none" stroke-width="2" />
<circle class="nds-progress-track" cx="12" cy="12" r="10" fill="none" stroke-width="2"
stroke-dasharray="62.83" stroke-dashoffset="62.83" stroke-linecap="round" />
</svg>
<div class="nds-progress-info">
<span class="nds-progress-out-of">
<span class="nds-progress-number"></span>
<span class="nds-progress-of"></span>
</span>
<span class="nds-progress-text">SGPA</span>
</div>
</div>
Progress Line
Linear indicator with label, fill percentage, and feedback message for file uploads, form completion, and multi-step workflows
<div class="nds-progress-bar nds-lg" data-value="65">
<span class="nds-progress-label">Uploading document.pdf</span>
<div class="nds-progress-track">
<div class="nds-progress-fill"></div>
</div>
<span class="nds-feedback nds-sm">
<span class="nds-feedback-icon"><i class="nds-icon" aria-hidden="true"></i></span>
<span class="nds-feedback-message">Processing your file...</span>
</span>
</div>
Built-in Features
Reads data-value, data-num, and data-max on page load and sets CSS custom properties automatically.
Set data-value on any circle or bar and the fill, percentage text, and CSS properties update reactively through a shared attribute observer.
Show values as fractions like 3.75/5 using data-num and data-max. The progress fill auto-calculates from the ratio.
Five circle sizes from compact inline counters to large hero displays, plus three bar heights, with text and icons that scale proportionally.
Success and error statuses swap the percentage for a feedback icon and apply the matching color automatically.
The large progress bar displays the current percentage inside the fill track, keeping the value visible without extra labels.
Both circle and bar fills animate smoothly when the progress value changes, giving users clear visual feedback during updates.
Update values at runtime with NDS.Progress.setValue() and NDS.Progress.setOutOf(). Changes propagate through the attribute observer automatically.
Usage Guidelines
Best Practices
- Use progress circles for KPI displays, dashboard stats, and completion summaries where the value itself is the focus
- Use progress bars for file uploads, form completion, and any operation where the user is waiting for a process to finish
- Use the out-of display (
data-num+data-max) for GPA, ratings, or scores where showing the fraction is more meaningful than a percentage - Choose the large bar (
nds-lg) when you want the percentage visible inside the track without additional labels - Use small or medium bars when the progress indicator sits alongside other content and should not dominate the layout
- Prefer
data-valueover inlinestyle="--progress-value"for setting progress. Data attributes enable reactive updates and work with the JS API - Set
data-status="success"only when the operation completes. The value automatically locks to 100% and shows a feedback icon - Add a
.nds-progress-labeland.nds-feedback-messageto the bar so users understand what is progressing and its current state - Do not use progress components for indeterminate loading states. Use the Loading component instead
- For multi-step workflows with discrete stages, prefer the Stepper component over a progress bar
- Use
NDS.Progress.setValue()or updatedata-valuedirectly to animate the fill at runtime. The CSS transition handles smooth movement automatically
Modifier Classes
| Class | Applies to | Description |
|---|---|---|
nds-xs | Circle | 24px, hides percentage symbol and label text |
nds-sm | Circle / Bar | Circle: 40px, hides label text. Bar: 4px track height, hides inline percentage |
nds-md | Circle / Bar | Circle: 64px (default). Bar: 8px track height (default) |
nds-lg | Circle / Bar | Circle: 120px. Bar: 16px track height with percentage inside the fill |
nds-xl | Circle | 160px large display |
nds-2xl | Circle | 200px hero display |
nds-neutral | Circle / Bar | Neutral gray color variant |
Data Attributes
| Attribute | Description |
|---|---|
data-value | Progress percentage (0–100). Sets --progress-value via JS. Has priority over inline style |
data-num | Numerator for "out of" display (e.g. 3.75). Populates .nds-progress-number text and auto-calculates progress value |
data-max | Denominator for "out of" display (e.g. 5). Populates .nds-progress-of text. Used with data-num |
data-status="success" | Locks value to 100%, applies success color, and shows a feedback icon instead of the percentage |
data-status="error" | Applies error color and shows the feedback icon. Value stays at its current position |
CSS Custom Properties
| Property | Default | Description |
|---|---|---|
--progress-value | 0 | Current progress (0 to 100). Values above 100 are clamped. Update via JS to animate the fill |
--progress-size | 64px | Circle diameter. Overridden by size classes (nds-xs through nds-xl) |
--progress-color | var(--background-primary) | Fill and stroke color for both circle and bar |
--progress-track-color | var(--colors-neutral-100) | Background track color for the circle |
--progress-height | 8px | Bar track height. Overridden by size classes |
JavaScript API
The NDS.Progress API reads data-value, data-num, and data-max attributes on initialization and observes changes reactively. For dynamically added elements, call NDS.Progress.init() to pick them up.