twblazor.templates
3.7.1
dotnet tool install --global twblazor.templates --version 3.7.1
dotnet new tool-manifest
dotnet tool install --local twblazor.templates --version 3.7.1
#tool dotnet:?package=twblazor.templates&version=3.7.1
nuke :add-package twblazor.templates --version 3.7.1
twblazor.templates
Create a Blazor Web App with twblazor and Tailwind CSS in one command.
The templates share one set of pages and layouts across Server, WebAssembly and Auto interactivity, so the app you get is the app you keep: no sample counter, no weather page, just a clean starting point.
Templates
- dashboard: a sidebar, a top bar, KPI cards, revenue/traffic/order charts, recent orders and activity.
- sidebar: grouped sidebar navigation, a welcome and resources page, and a settings form.
- navbar: a top navigation bar with the same welcome and settings pages.
- blank: a centered Hello world page with a link to the twblazor docs.
Every layout includes TwToastProvider and TwDialogProvider, light and dark mode classes, and a 404 page.
Install
dotnet tool install -g twblazor.templates
This is a .NET tool, so install it with dotnet tool install, not dotnet new install.
Create an app
Once the tool is installed, twblazor new is the only command you need:
twblazor new MyApp
To install the tool and create an app in one PowerShell line:
dotnet tool install -g twblazor.templates; twblazor new MyApp -i wasm -t dashboard
twblazor install only registers the templates with dotnet new; it does not create an app.
Choose the render mode and layout:
twblazor new MyApp -i wasm -t dashboard
twblazor new MyApp -i auto -t sidebar
twblazor new MyApp -i server -t navbar
twblazor new MyApp -i server -t blank
| Option | Values | Default |
|---|---|---|
-i, --interactivity |
server, wasm / webassembly, auto |
server |
-t, --template |
dashboard, sidebar, navbar, blank |
dashboard |
-f, --framework |
net11.0, net10.0 |
net11.0 |
-o, --output |
Folder to create the app in | ./MyApp |
--templates |
Template folder or package id | Installed templates |
--tailwind |
cli or npm - how to build the stylesheet |
Prompt, or cli when not interactive |
--no-restore |
Skip dotnet restore |
|
--no-npm |
Skip the Tailwind CSS build (same as the menu's "Skip") | |
--force |
Write into a folder that is not empty |
twblazor is built for .NET 11 from 3.7.0, and twblazor.templates 3.7.0 and later reference it. Until then, net11.0 apps use a twblazor version built for .NET 10, so prefer -f net10.0 with an older tool.
The command installs the templates, creates the solution and restores NuGet packages. It then asks how to build the Tailwind stylesheet - the Tailwind CSS CLI via npx (default), npm, or skip. npx leaves nothing behind, and on success the npm path removes node_modules and package-lock.json, so the project stays clean. It then prints the two commands needed to run the app.
Node.js is required for the cli and npm build options; pass --no-npm to create the app without building the stylesheet. Add --tailwind cli to skip the prompt in scripts.
Render modes
| Mode | Projects | Where the UI lives |
|---|---|---|
server |
MyApp |
MyApp/ |
wasm |
MyApp and MyApp.Client |
MyApp.Client/ |
auto |
MyApp and MyApp.Client |
MyApp.Client/ |
The pages, layouts and Theme.cs move to the .Client project for WebAssembly and Auto, because that is where the interactive components run.
Contributing
The preview app, build instructions, screenshot setup, theme sync and release process are documented in CONTRIBUTING.md.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. net11.0 is compatible. |
This package has no dependencies.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 3.7.1 | 70 | 11/28/2026 | |
| 3.7.0 | 103 | 11/10/2026 | |
| 3.6.0 | 90 | 11/10/2026 | |
| 3.5.1 | 97 | 11/10/2026 | |
| 3.5.0 | 91 | 11/9/2026 | |
| 3.4.0 | 97 | 11/8/2026 | |
| 3.3.1 | 93 | 11/7/2026 | |
| 3.3.0 | 94 | 11/7/2026 | |
| 3.2.0 | 103 | 11/5/2026 | |
| 3.1.5 | 99 | 11/3/2026 | |
| 3.1.4 | 115 | 11/1/2026 | |
| 3.1.2 | 112 | 10/28/2026 | |
| 3.1.1 | 109 | 10/27/2026 | |
| 3.0.0 | 105 | 10/26/2026 | |
| 2.0.1 | 101 | 10/25/2026 | |
| 2.0.0 | 117 | 10/25/2026 |
