Progress
Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.
use leptos::prelude::*; use singlestage::*; use std::time::Duration; #[component] pub fn ProgressExample() -> impl IntoView { let value = RwSignal::new(13); Effect::new(move || { set_timeout(move || value.set(66), Duration::from_millis(500)); }); view! { <Progress class="w-[60%]" value /> } }
Anatomy
Import all parts and piece them together.
use leptos::prelude::*; use singlestage::progress::*; #[component] pub fn ProgressAnatomy() -> impl IntoView { view! { <Progress /> } }
API Reference
Progress
Displays progress.
| Name | Type | Default | Description |
|---|---|---|---|
| max | usize | 100 | The value that represents 100%, or full. |
| value | usize | 0 | The current progress value to be rendered. |
Implements global attributes.