Project templates for Swap.Htmx - The Reactive UI Orchestration library for ASP.NET Core. Includes MVC starter and modular monolith templates with pre-configured HTMX, DaisyUI 5, Tailwind CSS v4, LibMan, EF Core, and Source Generators.
$ dotnet add package Swap.TemplatesThis package contains project templates for building Swap.Htmx applications.
Install the templates from NuGet:
dotnet new install Swap.Templates
| Template Name | Short Name | Description |
|---|---|---|
| Swap.Htmx MVC App | swap-mvc | A clean, "batteries-included" MVC project with Swap.Htmx pre-configured. |
dotnet new swap-mvc -n MyProject
| Option | Description | Default |
|---|---|---|
--IncludeSse | Include HTMX SSE extension and configuration for real-time updates. | false |
--UseLocalRef | Use local project references (for development of Swap itself). | false |
dotnet new swap-mvc -n RealtimeApp --IncludeSse
The swap-mvc template provides a production-ready starting point:
libman.json.[SwapEventSource] is pre-configured for type-safe events.this.SwapView() and this.SwapResponse() extension methods._Message.cshtmlEvents/AppEvents.cs for centralized event management.