Skip to content

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).

MethodTypeDefaultDescription
.new(value)f32Completion ratio, 0.01.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.

Released under the MIT License.