eone.Spectre.Console.TemplateColumn
1.1.0
dotnet add package eone.Spectre.Console.TemplateColumn --version 1.1.0
NuGet\Install-Package eone.Spectre.Console.TemplateColumn -Version 1.1.0
<PackageReference Include="eone.Spectre.Console.TemplateColumn" Version="1.1.0" />
<PackageVersion Include="eone.Spectre.Console.TemplateColumn" Version="1.1.0" />
<PackageReference Include="eone.Spectre.Console.TemplateColumn" />
paket add eone.Spectre.Console.TemplateColumn --version 1.1.0
#r "nuget: eone.Spectre.Console.TemplateColumn, 1.1.0"
#:package eone.Spectre.Console.TemplateColumn@1.1.0
#addin nuget:?package=eone.Spectre.Console.TemplateColumn&version=1.1.0
#tool nuget:?package=eone.Spectre.Console.TemplateColumn&version=1.1.0
eone.Spectre.Console.TemplateColumn
A message template-based progress column for Spectre.Console.
What is this?
TemplateColumn allows you to render progress bars using Serilog's message template syntax.
Instead of manually composing multiple progress columns,
you can use a familiar string template format to define how your progress should look.
This solves the problem of creating custom, flexible progress displays
without writing custom ProgressColumn implementations for each variation.
Installation
dotnet add package eone.Spectre.Console.TemplateColumn
Quick Start
using Spectre.Console;
using eone.Spectre.Console.TemplateColumn;
// Basic usage with auto-discovered columns
AnsiConsole
.Progress()
.Columns(new TemplateColumn("{Description} {ProgressBarColumn} {Percentage}%", true))
.Start(ctx =>
{
var task = ctx.AddTask("Downloading");
while (!task.IsFinished)
{
task.Increment(1);
Thread.Sleep(10);
}
});
Usage
Constructor Options
TemplateColumn provides two constructors:
1. Auto-discover columns
new TemplateColumn("{Description}: {ProgressBarColumn}", autoDiscoverColumns: true)
This scans all loaded assemblies for ProgressColumn subclasses and makes them available in your template.
2. Explicit columns
new TemplateColumn(
"{Description}: {ProgressBarColumn}",
new ProgressBarColumn(),
new PercentageColumn(),
new TaskDescriptionColumn()
)
Pass columns explicitly for more controlled behavior.
Column Templates
Templates use Serilog's message template syntax. You can include ProgressTask properties and columns:
"{Value}" // Task value
"{Description,-20}" // Left-align, 20 chars wide
"{Percentage,5}%" // Right-align, 5 chars wide, followed by %
"{ProgressBarColumn,-20}" // Columns can be aligned too
"{Percentage:P0}" // Format percentage (e.g., 45%)
"{MaxValue:N1}" // Format max value with 1 decimal place (e.g., 100.0)
Note: Alignment works for both properties and columns. Format specifiers only work with properties.
Note: Spectre.Console markup (e.g., [bold], [red]) is not currently supported in templates.
Examples
Simple progress with percentage
new TemplateColumn("{Description} [{ProgressBarColumn}] {Percentage}%", true)
Detailed status
new TemplateColumn("{Description,-30} {Value}/{MaxValue} {SpinnerColumn}", true)
Custom layout with explicit columns
new TemplateColumn(
"{Description}: {ProgressBarColumn} {Percentage:P0}",
new ProgressBarColumn(),
new PercentageColumn()
)
Requirements
- .NET 10.0+
- Spectre.Console 0.54.0+
- Serilog (for message template parsing)
License
MIT License - see LICENSE
| 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 was computed. 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 was computed. 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
- Serilog (>= 4.3.1)
- Spectre.Console (>= 0.54.0)
-
net8.0
- Serilog (>= 4.3.1)
- Spectre.Console (>= 0.54.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 |
|---|---|---|
| 1.1.0 | 391 | 3/15/2026 |