DEXS.Console.FancyProgress
0.50.0
dotnet add package DEXS.Console.FancyProgress --version 0.50.0
NuGet\Install-Package DEXS.Console.FancyProgress -Version 0.50.0
<PackageReference Include="DEXS.Console.FancyProgress" Version="0.50.0" />
<PackageVersion Include="DEXS.Console.FancyProgress" Version="0.50.0" />
<PackageReference Include="DEXS.Console.FancyProgress" />
paket add DEXS.Console.FancyProgress --version 0.50.0
#r "nuget: DEXS.Console.FancyProgress, 0.50.0"
#:package DEXS.Console.FancyProgress@0.50.0
#addin nuget:?package=DEXS.Console.FancyProgress&version=0.50.0
#tool nuget:?package=DEXS.Console.FancyProgress&version=0.50.0
DEXS.Console.FancyProgress Usage
Overview
DEXS.Console.FancyProgress
provides a drop-in, highly customizable progress bar column for Spectre.Console, supporting Unicode, emoji, and custom patterns.
Basic Example
using Spectre.Console;
using DEXS.Console.FancyProgress;
AnsiConsole.Progress()
.AutoClear(false)
.Columns(
new TaskDescriptionColumn(),
new FancyProgressBarColumn
{
Width = 40,
ProgressStyle = new Style(foreground: Color.Green),
CompletedStyle = new Style(foreground: Color.Lime),
RemainingStyle = new Style(foreground: Color.Grey35),
ProgressPattern = ProgressPattern.Known.Braille,
},
new PercentageColumn(),
new RemainingTimeColumn(),
new SpinnerColumn { Spinner = Spinner.Known.Dots12 }
)
.Start(ctx =>
{
var task = ctx.AddTask("[green1]Processing...[/]", maxValue: 100);
while (!ctx.IsFinished)
{
task.Increment(1.5);
Thread.Sleep(20);
}
});
Gradient and Tail Style Support
You can enable a color gradient for the filled portion of the progress bar by setting both ProgressStyle
and ProgressTailStyle
(for in-progress) or CompletedStyle
and CompletedTailStyle
(for completed) on the FancyProgressBarColumn
. The bar will smoothly blend from the start color to the tail color as progress increases.
Example:
new FancyProgressBarColumn
{
Width = 40,
ProgressStyle = new Style(foreground: new Color(0, 255, 163)), // Start color
ProgressTailStyle = new Style(foreground: new Color(177, 79, 255)), // End color (tail)
CompletedStyle = new Style(foreground: Color.Lime),
CompletedTailStyle = new Style(foreground: Color.Green),
RemainingStyle = new Style(foreground: Color.Grey35),
ProgressPattern = ProgressPattern.Known.UnicodeBar
}
Properties:
ProgressStyle
: The style (color) at the start of the filled bar (left side, in-progress).ProgressTailStyle
: The style (color) at the end of the filled bar (right side, in-progress). Set the foreground to a color to enable the gradient.CompletedStyle
: The style for the start of the bar when completed.CompletedTailStyle
: The style for the end of the bar when completed.RemainingStyle
: The style for the unfilled portion.
If ProgressTailStyle.Foreground
or CompletedTailStyle.Foreground
is set to Color.Default
, no gradient is applied and the bar uses a solid color from the corresponding start style.
Using Custom Patterns at Runtime
You can define your own progress bar patterns at runtime by subclassing ProgressPattern
directly in your application code—no need to edit the JSON or recompile the library. Example:
using DEXS.Console.FancyProgress;
public class MyCustomPattern : ProgressPattern
{
public override string Name => "My Custom";
public override bool IsUnicode => true;
public override bool IsCursor => false;
public override IReadOnlyList<string> Pattern => new[] {
"░",
"█"
};
}
// Usage:
var customPattern = new MyCustomPattern();
AnsiConsole.Progress()
.Columns(
new FancyProgressBarColumn {
ProgressPattern = customPattern
}
// ... other columns ...
)
.Start(ctx => { /* ... */ });
foreach (var pattern in ProgressPattern.Known.AllPatterns)
{
AnsiConsole.WriteLine($"Pattern: {pattern.Name} - {string.Join("", pattern.Pattern)}");
}
Advanced: Indeterminate Bars & Cursor Mode
- Use
IsIndeterminate
on the task for animated bars. - Use patterns with
IsCursor: true
for cursor-style progress.
API Reference
FancyProgressBarColumn
(main column type)ProgressPattern.Known
(all built-in patterns)ProgressPattern
(base class for custom patterns)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Spectre.Console (>= 0.50.0)
-
net10.0
- Spectre.Console (>= 0.50.0)
-
net8.0
- Spectre.Console (>= 0.50.0)
-
net9.0
- Spectre.Console (>= 0.50.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.50.0 | 154 | 8/29/2025 |