Installation#
npmpnpmyarnbun
Examples#
Default#
Default
Sizes#
Available in four sizes to fit different UI contexts.
Sizes
Colors#
Progress bars support multiple color palettes.
Colors
Different Values#
Values
Indeterminate#
Use indeterminate state when the progress duration is unknown.
Indeterminate
Animated Progress#
Animated
File Upload Example#
File Upload
With Label#
With Label
Anatomy#
Usage#
Import
import { Progress } from "@sugarcoat/ui-nxt";Usage
<Progress value={75} color="primary" size="md">
<Progress.Track>
<Progress.Indicator />
</Progress.Track>
</Progress>Props#
Progress (Root)#
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | null | - | Current progress value (0-100). Use null for indeterminate state. |
| size | "xs" | "sm" | "md" | "lg" | "sm" | Size of the progress bar |
| color | "default" | "primary" | "accent" | "success" | "danger" | "gradient" | "primary" | Color palette for the progress indicator |
| max | number | 100 | Maximum value for the progress |
| min | number | 0 | Minimum value for the progress |
Accessibility#
- Built on Base UI Progress for robust accessibility
- Automatically sets
role="progressbar"with proper ARIA attributes aria-valuenow,aria-valuemin, andaria-valuemaxare set automatically- Indeterminate state is properly announced to screen readers
- Provide visible labels or aria-label for context