iced-cube

Feedback

Progress

A determinate progress bar with an optional label and percentage.

use iced_cube::progress;
use iced_cube::feedback::progress::{Size, Variant};
API reference
Variants: Labelled bars with a percentage, in every colour.Variants: Labelled bars with a percentage, in every colour.
Static preview
Variants. Labelled bars with a percentage, in every colour.

Usage

Use a progress bar when you know how much work is left. When you do not, show a spinner instead.

The bar is stateless: keep the value in your app and pass it in on every view. The clamp and percentage helpers in the module are there if you need the same maths elsewhere.

Examples

Sizes

Small, medium and large bars.

Sizes: Small, medium and large bars.Sizes: Small, medium and large bars.
Static preview

Interactive

The bar follows a value held in app state.

Interactive: The bar follows a value held in app state.Interactive: The bar follows a value held in app state.
Static preview

API

ItemDescription
progress(value)Creates a bar from a value between 0.0 and 1.0. Values outside that range are clamped, and NaN counts as 0.0.
.label(text)Shows a caption above the bar.
.show_percentage(bool)Shows the rounded percentage above the bar, on the right.
.variant(Variant)Default, Success, Warning or Destructive. Defaults to Default.
.size(Size)Sm, Md or Lg thickness. Defaults to Md.
.width(length)Overrides the width. Bars fill the available width by default.
Esc