GitHub

htmxRazor

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


Tag Helper Components

85+ server-rendered components across 11 categories. Buttons, forms, data tables, kanban boards, 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.


What's New in v2.0

Platform tools, real-time connectivity, modern CSS, and a drag-and-drop Kanban board.

Theme Builder

Interactive page with color pickers for every --rhx-* token. Real-time preview, smart palette generation from a single color, and downloadable CSS override file.

Try it

Component Playground

Property toggle panels on demo pages. Change variant, size, and state props; the server re-renders via htmx. Shareable URL state and generated Razor markup.

See Button example

SignalR Hub Connector

Declarative <rhx-signalr> Tag Helper for real-time SignalR connections. Swaps received HTML fragments, with auto-reconnect, group support, and connection state indicator.

View docs

Kanban Board

Drag-and-drop <rhx-kanban> with columns, cards, WIP limits, and keyboard navigation. Card drops fire hx-post for server persistence.

View docs

CSS Anchor Positioning

Tooltip, popover, popup, and dropdown now use the CSS Anchor Positioning API in modern browsers, with automatic JS fallback. Less JavaScript, better viewport handling.

VS Code Snippets

97 code snippets for every <rhx-*> tag with smart tabstops, choice lists, htmx variants, and multi-component composition snippets.


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