Skip to main content
twblazor
Home
  • Get started
  • Tailwind with Blazor
  • Why twblazor?
  • Theme
  • Class Merge
    • Configuring localization
    • RTL Provider
  • Breadcrumb
  • Card
  • Carousel
  • Collapse
  • Context Menu
  • Drawer
  • Footer
  • Menu
  • Navbar
  • On This Page
  • Separator
  • Sidebar
  • Stepper
  • Tabs
  • Tree List
  • Container
  • Flex
  • Grid
  • Text
  • Link
  • Button
  • Form
    • AutocompleteNew
    • Checkbox
    • Color Picker
    • Date Picker
    • Date Range Picker
    • Datetime Picker
    • Datetime Range Picker
    • File Upload
    • Input GroupNew
    • NumericNew
    • Masked InputNew
    • Radio Button
    • Range SliderNew
    • RatingNew
    • Select
    • Slider
    • Switch
    • Tag InputNew
    • Text EditorNew
    • Textfield
    • Time Picker
    • Time Range Picker
  • Toggle
  • Toggle Group
  • Alert
  • Avatar
  • Badge
  • Chip
  • Empty
  • Icon
  • Popover
  • Progress
  • Skeleton
  • Spinner
  • Tooltip
  • Data Table
  • SpreadsheetNew
  • Column Filter Editor
  • Pagination
  • Pick List
  • Barcode
  • QR Code
  • Calendar
  • Table
  • Attachment
  • Overview
    • Bar
    • Bullet
    • Column
    • Dot Plot
    • Dumbbell
    • Icon
    • Lollipop
    • Radial Bar
    • Range
    • Word Cloud
    • Area
    • Bump
    • Bump Area
    • Candlestick
    • Gantt
    • Horizon
    • Line
    • Slope
    • Small Multiples
    • Stream Graph
    • Funnel
    • Gauge
    • Marimekko
    • Nightingale
    • Pie
    • Treemap
    • Waffle
    • Waterfall
    • Circular Treemap
    • Convex Treemap
    • Dendrogram
    • Sunburst
    • Barcode
    • Beeswarm
    • Box Plot
    • Density Plot
    • Histogram
    • Radial Histogram
    • Ridgeline
    • Strip Plot
    • Violin Plot
    • Categorical Scatter
    • Contour
    • Hexagonal Binning
    • Quadrant
    • Scatter
    • Heatmap
    • Matrix
    • Parallel Coordinates
    • Radar
    • Arc Diagram
    • Chord Diagram
    • Flowchart
    • Network Diagram
    • Sankey
    • Euler Diagram
    • Venn Diagram
  • Bubble
  • Marker
  • Message
  • Dialog Service
  • Toast Service
API DocumentationAI Agents & Skills
Home Get Started

Feedback

TwProgress

TwProgress is a Blazor progress bar component. Set Value, Max, Color and Size, or use Indeterminate mode when the duration is unknown.

Last updated 11 October 2026

Basic usage

A styled wrapper around the native <progress> element - it keeps the built-in progressbar role and automatic aria-valuenow/aria-valuemin/aria-valuemax semantics for free.
40%
RAZOR
<TwProgress T="int" Id="download-progress" Label="Download Progress" Value="40" Max="100" />

Colors

Use Color to give a progress bar meaning at a glance - here it signals status rather than just decoration.
50%
50%
50%
50%
50%
50%
50%
50%
RAZOR
@foreach (Color c in ((Color[])Enum.GetValues(typeof(Color))).Take(10))
{
    @if (c != Color.Light && c != Color.Dark)
    {
        <div class="block mt-4">
            <div class="p-3">
                <TwProgress T="int" Id="@($"{c.ToString()}-progress")" Label="@c.ToString()" Value="50" Max="100" Color="c" />
            </div>
        </div>
    }
    else
    {
        <div class="block mt-4">
            <div class="@(c == Color.Light ? "bg-gray-900 p-3 rounded-lg" : "bg-white p-3 rounded-lg")">
                <TwProgress T="int" Id="@($"{c.ToString()}-progress")" Label="@c.ToString()" Value="50" Max="100" LabelClass="@(c == Color.Light ? "mt-2 text-white dark:text-white" : "mt-2 text-gray-900 dark:text-gray-900")" Color="c" />
            </div>
        </div>
    }
}

Sizes

Use Size to control the bar's thickness.
30%
55%
80%
RAZOR
<div class="space-y-6">
    <TwProgress T="int" Id="small-progress" Label="Small" Value="30" Max="100" Size="ProgressSize.Small" Color="Color.Warning" />
    <TwProgress T="int" Id="medium-progress" Label="Medium" Value="55" Max="100" Size="ProgressSize.Medium" Color="Color.Warning" />
    <TwProgress T="int" Id="large-progress" Label="Large" Value="80" Max="100" Size="ProgressSize.Large" Color="Color.Warning" />
</div>

Indeterminate

Set Indeterminate when the completion amount isn't known yet - the value attribute is omitted so it renders (and is announced) as busy rather than "0% done".
Loading...
RAZOR
<TwProgress T="int" Id="sync-progress" Label="Syncing..." Max="100" Indeterminate />

Animated

Set Animated to sweep a shimmer across the filled portion of the bar while work is ongoing. It is decorative only - the announced value is unchanged - and it is switched off for users who prefer reduced motion.
60%
RAZOR
<TwProgress T="int" Id="animated-progress" Label="Uploading..." Value="60" Max="100" Size="ProgressSize.Large" Animated />

Interactive

Drive Value from your own component state - there's no built-in user interaction, so the bar only moves when your code updates it.
20%

20% complete

RAZOR
<TwProgress T="int" Id="interactive-progress" Label="Upload Progress" Value="uploadValue" Max="100" />
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">@uploadValue% complete</p>
<TwButton Class="mt-3" Color="Color.Primary" Disabled="@(uploadValue >= 100)" OnClick="Advance">
    Upload next chunk
</TwButton>
CSHARP
@code {
    private int uploadValue = 20;
    
    private void Advance() => uploadValue = Math.Min(100, uploadValue + 20);
}

Disabled

Use Disabled to dim a progress bar that's paused or inactive.
45%
RAZOR
<TwProgress T="int" Id="disabled-progress" Label="Paused" Value="45" Max="100" Disabled />

Keyboard navigation

A progress bar is not interactive and is not a Tab stop. Screen readers announce its label and value, or that it is busy when it is indeterminate.

Theme configuration

Styling is controlled by TwBlazorTheme.Components (a TwProgressTheme), configured via the AddTwBlazor() options callback described on the Get Started page. Every property is a set of Tailwind classes, so changes are picked up by your own Tailwind build.
Property Type Controls
Base string
Small string
Medium string
Large string
Wrapper string
Animated string

Global Theme Configuration

These reuse shared design tokens configured once on TwBlazorTheme, rather than being unique to this component.
Property Type Controls
Colors TwBlazorPalette

Full reference: TwProgressTheme on the API docs.

On this page

  • Basic usage
  • Colors
  • Sizes
  • Indeterminate
  • Animated
  • Interactive
  • Disabled
  • Keyboard navigation
  • Theme configuration
twblazor

The Tailwind CSS component library for Blazor. Accessible, themeable and MIT licensed.

Discord (opens in a new tab) GitHub(opens in a new tab)

Get started

  • Install guide
  • Theming
  • Class merging
  • Localization

Guides

  • Tailwind CSS with Blazor
  • Why twblazor?
  • Right to left
  • AI agents and skills

Resources

  • API documentation (opens in a new tab)
  • llms.txt (opens in a new tab)
  • MIT License (opens in a new tab)

Community

  • Contributing (opens in a new tab)
  • Code of conduct (opens in a new tab)
  • Report an issue (opens in a new tab)

twblazor is and always will be free and open source.

An unhandled error has occurred. Reload