Htmx.Components
1.0.6
dotnet add package Htmx.Components --version 1.0.6
NuGet\Install-Package Htmx.Components -Version 1.0.6
<PackageReference Include="Htmx.Components" Version="1.0.6" />
<PackageVersion Include="Htmx.Components" Version="1.0.6" />
<PackageReference Include="Htmx.Components" />
paket add Htmx.Components --version 1.0.6
#r "nuget: Htmx.Components, 1.0.6"
#:package Htmx.Components@1.0.6
#addin nuget:?package=Htmx.Components&version=1.0.6
#tool nuget:?package=Htmx.Components&version=1.0.6
Htmx.Components
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.
✨ What You Get
- 🚀 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
🚀 Quick Example
// 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);
}
}
@await Component.InvokeAsync("NavBar")
@await Component.InvokeAsync("AuthStatus")
@await Component.InvokeAsync("Table", Model)
<htmx-scripts></htmx-scripts>
<htmx-page-state></htmx-page-state>
Result: Dynamic navigation, interactive tables, auth integration - all with server-side rendering.
📖 Documentation
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 |
💻 Requirements
- .NET 8.0+
- ASP.NET Core
- HTMX 2.0+
🤝 Contributing
Contributions welcome! See our Contributing Guide for development setup and guidelines.
📄 License
MIT License - see LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- CssExtractor.MSBuild (>= 1.7.4)
- FastExpressionCompiler (>= 5.0.3)
- Htmx (>= 1.8.1)
- Htmx.TagHelpers (>= 1.8.1)
- Humanizer (>= 2.14.1)
- Microsoft.AspNetCore.Authentication.OpenIdConnect (>= 8.0.0)
- Microsoft.EntityFrameworkCore (>= 8.0.14)
- Razor.Templating.Core (>= 2.1.0)
- Serilog (>= 4.2.0)
- System.Linq.Dynamic.Core (>= 1.6.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See https://github.com/ucdavis/Htmx.Components/releases for release notes.