A beautiful, production-ready progress bar library for .NET console applications.
- 6 Beautiful Themes - Default, Ocean, Sunset, Forest, Neon, Minimal
- Smooth Animations - Fractional block characters for buttery-smooth progress
- Gradient Colors - True-color gradient across the progress bar
- Rich Information Display - Percentage, ETA, speed, elapsed time, count
- Spinner - Indeterminate progress with 6 animation styles
- Fluent API - Chainable configuration for easy customization
- Thread-Safe - Safe to use from multiple threads
- Responsive - Auto-detects terminal width
- Production-Ready - IDisposable, validation, graceful degradation
using ProgressBar;
// Simple usage
using var bar = new ProgressBar(100);
for (int i = 0; i < 100; i++)
{
bar.Tick();
}var options = new ProgressBarOptions()
.WithTheme(ProgressBarTheme.Ocean);
using var bar = new ProgressBar(100, options);Available themes:
| Theme | Description |
|---|---|
Default |
Classic green on gray |
Ocean |
Blue/cyan gradient |
Sunset |
Warm orange/pink |
Forest |
Earth green tones |
Neon |
Cyberpunk purple/cyan |
Minimal |
Clean monochrome |
var options = new ProgressBarOptions()
.WithTheme(ProgressBarTheme.Sunset)
.WithWidth(50)
.WithBarChar("█", "░")
.WithPercentage()
.WithETA()
.WithSpeed()
.WithElapsedTime()
.WithCount()
.WithMessage("Processing files...");
using var bar = new ProgressBar(1000, options);For indeterminate progress:
using var spinner = new Spinner(SpinnerStyle.Dots, "Loading...");
spinner.Start();
// Do work...
spinner.UpdateMessage("Processing...");
// Done
spinner.Stop("✓ Complete!");Available spinner styles: Dots, Line, Circle, Bounce, Arrow, Moon
| Method | Description |
|---|---|
Tick() |
Advance by 1 |
Tick(long n) |
Advance by n |
SetProgress(long value) |
Set absolute progress |
SetMessage(string? msg) |
Update display message |
Complete() |
Mark as complete |
Complete(string msg, string color) |
Complete with status |
Fail() |
Mark as failed |
Hide() / Show() |
Toggle visibility |
| Method | Description |
|---|---|
WithWidth(int) |
Bar width (default: 40) |
WithTheme(ProgressBarTheme) |
Color theme |
WithBarChar(filled, empty) |
Bar characters |
WithPercentage(bool) |
Show percentage |
WithETA(bool) |
Show estimated time |
WithSpeed(bool) |
Show items/sec |
WithElapsedTime(bool) |
Show elapsed time |
WithCount(bool) |
Show current/total |
WithMessage(string?) |
Custom message |
WithAutoComplete(bool) |
Auto-complete on dispose |
using var bar = new ProgressBar(100, new ProgressBarOptions()
.WithMessage("Initializing..."));
for (int i = 0; i < 100; i++)
{
if (i == 25) bar.SetMessage("Processing...");
if (i == 75) bar.SetMessage("Finalizing...");
bar.Tick();
}using var bar = new ProgressBar(50);
try
{
// Do work
bar.Complete("✓ SUCCESS", "\u001b[38;5;46m");
}
catch
{
bar.Fail();
}var bar = new ProgressBar(1000);
Parallel.For(0, 1000, i =>
{
// Process item
bar.Tick();
});dotnet add package ProgressBarOr clone the repository:
git clone https://github.com/hamza-siddiq/ProgressBar.git- .NET 8.0 or later
- Terminal with ANSI color support
MIT