-
Notifications
You must be signed in to change notification settings - Fork 9
Component ProgressBar
MeowLynxSea edited this page Jan 25, 2026
·
3 revisions
A horizontal progress indicator.
Supports:
- Determinate progress (
valuein[0.0, 1.0]) - Indeterminate progress (animated)
- File downloads, syncing, long-running tasks
- Inline progress under a header or in a settings panel
Not a good fit:
- Tiny inline spinners (use
Spinner) - Circular progress indicators (use
ProgressCircle)
-
progress_bar(): constructor (uses caller location to generate a default id) -
id(...): stable identity override -
value(f32): determinate progress in[0.0, 1.0](clamped) -
indeterminate(bool): indeterminate animation -
height(px(...)): bar height -
track_color(Hsla): override track color -
fill_color(Hsla): override fill color
Layout:
- ProgressBar is
w_full()by default. - Override width from the call site via style:
.w(px(...))/.max_w(px(...)).
- Height:
10px - Track:
theme.surface.hover - Fill:
theme.action.primary.bg
-
value(...)andindeterminate(true)are mutually exclusive (settingvalue(...)makes it determinate). -
valueis clamped to[0.0, 1.0].
use gpui::px;
use yororen_ui::component::progress_bar;
let view = progress_bar().value(0.65).w(px(240.));use gpui::px;
use yororen_ui::component::progress_bar;
let view = progress_bar().indeterminate(true).w(px(240.));Yororen UI v0.3.0 · repository · Apache-2.0 · This wiki documents Yororen UI v0.3.0.
This wiki documents Yororen UI v0.3.0 — the headless-core, swappable-renderer build.