Build rich, interactive console applications using familiar Razor syntax and the power of Spectre.Console

Component-Based

Build your console UI using familiar Razor components with full support for data binding, event handling, and component lifecycle methods.

Interactive

Create engaging user experiences with interactive elements like buttons, text inputs, selectors, and keyboard navigation.

15+ Built-in Components

Get started quickly with pre-built components covering layout, input, display, and navigation needs.

Quick Start

Get up and running in minutes

1. Install the package

dotnet add package RazorConsole.Core

2. Update your project file

<Project Sdk="Microsoft.NET.Sdk.Razor">
    <!-- your project settings -->
</Project>

3. Create your first component

// Counter.razor
@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++;
}