Project Templates
Start a new BlazOrbit project from a `dotnet new` template — Server or WebAssembly, .NET 8 or .NET 10, with optional localization wired up.
1. Install the templates
The templates ship as a single NuGet package. Install once and the
dotnet new CLI picks them up globally.
dotnet new install BlazOrbit.TemplatesUpdate to a newer release at any time:
dotnet new install BlazOrbit.Templates::*Uninstall when you no longer need them:
dotnet new uninstall BlazOrbit.Templates2. Available templates
Both templates ship the same component surface and theming pipeline. Pick the hosting model that fits your app.
| Short name | Hosting | Description |
|---|---|---|
blazorbit-server |
Blazor Server | Interactive Server render mode + cookie-friendly auth integration points. |
blazorbit-wasm |
Blazor WebAssembly | Standalone WASM with PWA manifest, service worker, and BlazOrbit bundles preconfigured. |
3. Parameters
| Parameter | Values | Default | Effect |
|---|---|---|---|
-F / --Framework |
net8.0 · net10.0 |
net8.0 |
Targets the chosen TFM and switches per-version host plumbing (e.g. MapStaticAssets, ImportMap, NotFoundPage). |
-IncludeLocalization |
true · false |
false |
Adds BlazOrbit.Localization.Server / .Wasm, registers RequestLocalization / localStorage bridge, and exposes BOBCultureSelector in the navbar. |
4. Generate a project
Blazor Server, .NET 10, no localization:
dotnet new blazorbit-server -n MyApp -F net10.0Blazor Server, .NET 10, with localization:
dotnet new blazorbit-server -n MyApp -F net10.0 -IncludeLocalization trueBlazor WebAssembly, .NET 8, no localization:
dotnet new blazorbit-wasm -n MyApp -F net8.0Blazor WebAssembly, .NET 10, with localization:
dotnet new blazorbit-wasm -n MyApp -F net10.0 -IncludeLocalization truecd MyApp && dotnet run to launch. The default Home page is a
live showcase of the component library you can edit at
Components/Pages/Home.razor (Server) or Pages/Home.razor (WASM).
5. What the template ships
Out of the box, every generated project includes:
- A pre-wired
BOBInitializerinMainLayout.razorwith theme switching and the modal/toast hosts. - A branded loading screen using the BlazOrbit icon, replaced once the interactive shell mounts.
- The CSS bundle linked from
_content/BlazOrbit/css/blazorbit.cssand the anti-flash bootstrap script. - A favicon set (SVG + 48/192/512 PNG) and, on WASM, a PWA manifest.
- A showcase Home page demonstrating buttons, inputs, cards, and accordion with palette-driven styling.
- When localization is enabled:
BOBCultureSelectorin the navbar,en-US/es-ES/fr-FRsample cultures, and the request-localization wiring.
For contributors — local feed
Validating template changes against unreleased library bits requires a local NuGet feed. The repo ships a script that packs the libraries plus the templates package, installs them, generates a matrix of sample projects, and builds each combo end-to-end.
./scripts/test-templates.ps1
See scripts/test-templates.ps1 -Help for flags
(-SkipBlazOrbitPack, -KeepWorkDir, custom -Matrix, …).