A comprehensive ASP.NET Core library for building interactive web applications with server-side rendering and HTMX integration. Get dynamic UIs with minimal JavaScript through reusable components, state management, and built-in authorization.
- 🚀 Ready-to-use components: Tables, navigation, auth status, forms
- 🔧 HTMX integration: Out-of-band updates, multi-swap responses, page state
- 🛡️ Authorization system: Resource-based permissions with ASP.NET Core integration
- 📱 Responsive design: Built for DaisyUI/Tailwind CSS
- ⚡ Automatic partial updates: Smart filters handle HTMX updates behind the scenes
// Program.cs - Minimal setup
builder.Services.AddHtmxComponents();
builder.Services.AddControllersWithViews()
.AddHtmxComponentsApplicationPart();
app.UseHtmxPageState();
app.UseAuthentication();
app.UseAuthorization();
// Controllers - Attribute-based navigation and tables
[NavActionGroup(DisplayName = "Admin")]
public class AdminController : Controller
{
[NavAction(DisplayName = "Users", Icon = "fas fa-users")]
public async Task<IActionResult> Users()
{
var tableModel = await _modelHandler.BuildTableModelAsync();
// Note that we are returning an ObjectResult here rather than a ViewResult.
// Htmx.Components makes use of result filters and action context to determine whether to return
// a ViewResult or a htmx-specific MultiSwapViewResult. For htmx requests, filters determine
// what partial views and models go into building the response.
return Ok(tableModel);
}
}
<!-- Layout - Components just work -->
@await Component.InvokeAsync("NavBar")
@await Component.InvokeAsync("AuthStatus")
@await Component.InvokeAsync("Table", Model)
<htmx-scripts></htmx-scripts> <!-- JavaScript behaviors -->
<htmx-page-state></htmx-page-state> <!-- State management -->
Result: Dynamic navigation, interactive tables, auth integration - all with server-side rendering.
Guide | Description |
---|---|
🚀 Getting Started | Installation, setup, and first working example |
👤 User Guide | Usage patterns, components, and examples |
🔧 Developer Guide | Architecture, extension points, and customization |
📚 API Reference | Complete API documentation |
- .NET 8.0+
- ASP.NET Core
- HTMX 2.0+
Contributions welcome! See our Contributing Guide for development setup and guidelines.
MIT License - see LICENSE file for details.