Skip to content
GitHub11 stars

Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.

x
@implements IDisposable

<Progress Value="_progress" aria-label="Loading" Class="w-[60%]" />

Installation

dnx Blazix.Cli add progress

Usage

<Progress Value="33" />

Composition

With label and value

Use ProgressLabel and ProgressValue to add a label and value display.

<Progress Value="56" Class="w-full max-w-sm">
    <ProgressLabel>Upload progress</ProgressLabel>
    <ProgressValue />
</Progress>
Progress
├── ProgressLabel
├── ProgressValue
└── ProgressTrack
    └── ProgressIndicator

Label

Use ProgressLabel and ProgressValue to add a label and value display.

Upload progress
x
<Progress Value="56" Class="w-full max-w-sm">
    <ProgressLabel>Upload progress</ProgressLabel>
    <ProgressValue />
</Progress>

Controlled

A progress bar that can be controlled by a slider.

x
<div class="flex w-full max-w-sm flex-col gap-4">
    <Progress Value="_value" aria-label="Progress" Class="w-full" />
    <Slider @bind-Value="_value" Min="0" Max="100" Step="1" aria-label="Set progress" />
</div>

@code {
    private double _value = 50;
}

RTL

To enable RTL support in Blazix, see the RTL configuration guide.

Translated with AI for the demo, so it may have mistakes.

تقدم الرفع
x
<Progress Value="56" Class="w-full max-w-sm">
    <ProgressLabel>@Texts[Language]</ProgressLabel>
    <ProgressValue Class="ms-auto">@Language.Digits(56)%</ProgressValue>

API Reference

Progress

ParameterTypeDefault
Render RenderFragment<ProgressRenderProps>? -
Value double? -
Min double 0
Max double 100
Format string? -
Culture CultureInfo? -
GetAriaValueText Func<string, double?, string>? -
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ProgressIndicator

ParameterTypeDefault
Render RenderFragment<ProgressRenderProps>? -
Class string? -

Other attributes are passed to the element it renders.

ProgressLabel

ParameterTypeDefault
Render RenderFragment<ProgressRenderProps>? -
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ProgressTrack

ParameterTypeDefault
Render RenderFragment<ProgressRenderProps>? -
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

ProgressValue

ParameterTypeDefault
Render RenderFragment<ProgressRenderProps>? -
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.