Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Progress for Astro

Astro progress tracks for a known value or an unknown completion time.

Files exported65%

Installation

bunx --bun shadcn@latest add @gnostic/progress

Usage

import { Progress } from "@/components/ui/progress"

Use the Code tab above for the complete Astro composition.

API reference

Read the registry source for the exported parts and prop types.

When to use Progress

Pass a value between min and max for measured progress. Omit value or pass null for an indeterminate task. The root supplies a default track and indicator; use the exported parts when you need a custom label layout.

Keyboard and behavior

Give the root aria-label or connect it to visible text with aria-labelledby. Values are clamped to the range, and indeterminate progress omits aria-valuenow. The component renders the initial value; live updates must keep the ARIA value and --progress-percentage in step.

Theme and layout

The indicator uses the primary token and the track uses input color. A reduced-motion preference removes its animation. Never invent a percentage when the task cannot report progress.