RazorConsole.Gallery
Build interactive console applications using .NET Razor
Install
No framework information available.
README
RazorConsole
Build interactive console applications with .NET Razor and Spectre.Console
Install
dotnet add package RazorConsole.Core
Usage
// Counter.razor
@using Microsoft.AspNetCore.Components
@using Microsoft.AspNetCore.Components.Web
@using RazorConsole.Components
<Columns>
<p>Current count</p>
<Markup Content="@currentCount.ToString()" Foreground="@Spectre.Console.Color.Green" />
</Columns>
<TextButton Content="Click me"
OnClick="IncrementCount"
BackgroundColor="@Spectre.Console.Color.Grey"
FocusedColor="@Spectre.Console.Color.Blue" />
@code {
private int currentCount = 0;
private void IncrementCount()
{
currentCount++;
}
}
// Program.cs
await AppHost.RunAsync<Counter>();
Built-in components
RazorConsole ships with a catalog of ready-to-use components that wrap Spectre.Console constructs:
Alignβ position child content horizontally and vertically within a fixed box.Borderβ draw Spectre borders with customizable style, color, and padding.Columnsβ arrange items side-by-side, optionally stretching to fill the console width.Figletβ render big ASCII art text using FIGlet fonts.Gridβ build multi-row, multi-column layouts with precise cell control.Markupβ emit styled text with Spectre markup tags.Newlineβ insert intentional spacing between renderables.Padderβ add outer padding around child content without altering the child itself.Panelβ frame content inside a titled container with border and padding options.Rowsβ stack child content vertically with optional expansion behavior.Selectβ present a focusable option list with keyboard navigation.Spinnerβ show animated progress indicators using Spectre spinner presets.SyntaxHighlighterβ colorize code snippets using ColorCode themes.TextButtonβ display clickable text with focus and pressed-state styling.TextInputβ capture user input with optional masking and change handlers.
See design-doc/builtin-components.md for the full reference, including parameters and customization tips.
Component Gallery
Explore the built-in components interactively with the RazorConsole Component Gallery. Install the tool globally and launch it from any terminal:
dotnet tool install --global RazorConsole.Gallery --version 0.0.2-alpha.181b79
After installation, run razorconsole-gallery to open the showcase and browse component examples rendered in the console. The gallery includes quick links back to this README for more details.

HotReload
RazorConsole supports hotreload via metadata update handler so you can apply UI changes on the fly.
Community & support
- File issues using the GitHub Issues tab.
License
This project is distributed under the MIT License. See LICENSE for details.
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.