GitHub

htmxRazor

Server-rendered UI components for ASP.NET Core with first-class htmx integration.


Tag Helper Components

72 server-rendered components across 10 categories. Buttons, forms, navigation, overlays, feedback, and more.

htmx Integration

Every component supports hx-get, hx-post, hx-target, hx-swap, and all htmx attributes natively.

Design Tokens

Light and dark themes via CSS custom properties. Toggle with a single attribute or JavaScript call.


Quick Start

1. Install the package

dotnet add package htmxRazor

2. Configure in Program.cs

builder.Services.AddhtmxRazor();

var app = builder.Build();
app.UsehtmxRazor();
app.MapRazorPages();

3. Register Tag Helpers

@addTagHelper *, htmxRazor

4. Use a component

<rhx-button rhx-variant="brand" hx-get="/api/data" hx-target="#result">
    Load Data
</rhx-button>

Component Categories