Progress
An indicator showing the completion progress of a task, typically displayed as a progress bar.
When to use
- Showing upload/download progress.
- Indicating how far through a multi-step task the user is.
API
Progress::new(value)
Creates a progress bar with a value between 0.0 and 1.0 (clamped).
| Method | Type | Default | Description |
|---|---|---|---|
.new(value) | f32 | — | Completion ratio, 0.0–1.0 |
Usage
rust
use gpui::{Component, div, prelude::*};
use components::Progress;
div().child(Component::new(Progress::new(0.66)))Copy the source
crates/components/src/progress.rs — self-contained, stateless, and free to modify.