Skip to content
Elements Progress

Progress

A determinate or indeterminate progress bar, with optional step labels.

On this page

Examples

Determinate and indeterminate

The indeterminate animation stops when the user prefers reduced motion.

Razor
<div class="flex w-full max-w-md flex-col gap-6">
    <KlyProgress Value="45" AriaLabel="Upload" Status />
    <KlyProgress Value="80" Color="KlyColor.Success" Size="KlySize.Lg" AriaLabel="Storage used" />
    <KlyProgress AriaLabel="Loading" />
    <KlyProgress Animation="KlyProgressAnimation.Swing" Color="KlyColor.Info" AriaLabel="Syncing" />
</div>

Steps

The value is the index of the current step; a button with OnClick stays disabled until the page is interactive.

CartShippingPaymentDone
Razor
<div class="w-full max-w-md">
    <KlyProgress Value="@_step" Steps="Steps" AriaLabel="Checkout" />
    <div class="mt-4 flex justify-center gap-2">
        <KlyButton Label="Back" Variant="ButtonVariant.Outline" Disabled="@(_step == 0)" OnClick="() => _step--" />
        <KlyButton Label="Next" Disabled="@(_step == Steps.Length - 1)" OnClick="() => _step++" />
    </div>
</div>

@code {
    private static readonly string[] Steps = ["Cart", "Shipping", "Payment", "Done"];
    private int _step = 1;
}

API

KlyProgress

Progress bar, determinate or indeterminate, with optional steps and a status text.

Parameters

Name Type Default Description
Animation KlyProgressAnimation KlyProgressAnimation.Carousel Motion of the indeterminate bar. It stops, leaving a full faded bar, when the user prefers reduced motion. Values: Carousel, Swing.
AriaLabel string Accessible name of the bar. Defaults to Progress .
Class string Classes added to the root element, merged last so they win over the theme.
Color KlyColor "primary" Semantic color of the progress: a built-in KlyColor or the name of a color you defined. When not set, Color applies, else the default of the component. Values: primary, secondary, success, info, warning, error, neutral.
Max Double 100 Largest value. Ignored when Steps is set: the maximum is then the index of the last step.
Size KlySize KlySize.Md Size of the progress, from Xs to Xl . When not set, Size applies, else the default of the component. Values: Xs, Sm, Md, Lg, Xl.
Status bool false Shows the percentage above the bar.
Steps IReadOnlyList<string> Labels of the steps shown under the progress bar. Value is the current step's index.
Ui ProgressUi Per-instance class overrides of the slots of the progress, see ProgressUi . They are merged after the theme and the Class parameter wins on the root slot.
Value Double? Current value between 0 and the maximum. Null makes the bar indeterminate (no aria-valuenow ), for work of unknown duration. With Steps it is the index of the current step.

Ui slots

Ui takes a ProgressUi with one class string per slot, merged after the theme.

Slot Styles
Root Classes merged into the root slot of KlyProgress , after the theme and the app configuration.
Status Classes merged into the status slot of KlyProgress , after the theme and the app configuration.
Base Classes merged into the base slot of KlyProgress , after the theme and the app configuration.
Indicator Classes merged into the indicator slot of KlyProgress , after the theme and the app configuration.
Steps Classes merged into the steps slot of KlyProgress , after the theme and the app configuration.
Step Classes merged into the step slot of KlyProgress , after the theme and the app configuration.