Guide

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.

Terminal
dotnet new install BlazOrbit.Templates

Update to a newer release at any time:

Terminal
dotnet new install BlazOrbit.Templates::*

Uninstall when you no longer need them:

Terminal
dotnet new uninstall BlazOrbit.Templates

2. 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:

Terminal
dotnet new blazorbit-server -n MyApp -F net10.0

Blazor Server, .NET 10, with localization:

Terminal
dotnet new blazorbit-server -n MyApp -F net10.0 -IncludeLocalization true

Blazor WebAssembly, .NET 8, no localization:

Terminal
dotnet new blazorbit-wasm -n MyApp -F net8.0

Blazor WebAssembly, .NET 10, with localization:

Terminal
dotnet new blazorbit-wasm -n MyApp -F net10.0 -IncludeLocalization true
ℹ️
Run cd 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 BOBInitializer in MainLayout.razor with 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.css and 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: BOBCultureSelector in the navbar, en-US / es-ES / fr-FR sample 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.

Terminal
./scripts/test-templates.ps1

See scripts/test-templates.ps1 -Help for flags (-SkipBlazOrbitPack, -KeepWorkDir, custom -Matrix, …).