Skip to content

Component ProgressBar

MeowLynxSea edited this page Jun 18, 2026 · 3 revisions

ProgressBar

A linear progress bar. Determinate (value + max) or indeterminate.

use yororen_ui::headless::progress::progress;

progress("upload", cx)
    .value(0.42).max(1.0)
    .label("Uploading…")
    .render(cx)

// indeterminate:
progress("loading", cx).indeterminate(true).render(cx)

Props

Method Purpose
value(v) Current value (default 0).
max(m) Maximum value (default 1).
label(s) Optional accessible label.
indeterminate(v) Render the looping indeterminate animation.
has_custom_height(v) Caller overrode the height.

Factory takes (id, _cx). Pure props — no state entity. .render(cx) returns Stateful<Div>.

For a determinate bar set both value and max; for an indeterminate bar set indeterminate(true) and skip both.

See also: Skeleton, Slider.

Clone this wiki locally