Skip to main content
Any Framework

Build interactive console applications using .NET Razor

Published
Oct 5, 2025
1y ago
Total Downloads
21.4K
21,372

Install

dotnet add package RazorConsole.Gallery --version 0.0.2-alpha.181b79

No framework information available.

README

RazorConsole

NuGet License

Build interactive console applications with .NET Razor components.

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>();

Image

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.1

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.

Component Gallery

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

No structural changes between v0.0.1+98f848 and v0.0.2-alpha.181b79.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.