Installation
Four steps: add the package, register the services, link the stylesheet, and import the namespaces.
1. Add the package
Veto targets .NET 10 and works in any Blazor project - WebAssembly, Server, or a Blazor Web App.
dotnet add package VetoVeto is a meta package: it has no components of its own, it just depends on
every Veto.* component package. Take individual packages instead if you only
want a few - each one pulls in Veto.Core and whatever else it genuinely uses,
and nothing else.
dotnet add package Veto.Buttons
dotnet add package Veto.Layout.Card
dotnet add package Veto.Theming2. Register the services
AddVeto() registers everything the components need, which today is the theme
service and the toast queue. In a Blazor Web App, call it in both projects -
the server needs it to prerender, the client needs it once WebAssembly takes over.
Installed packages individually? AddVeto() lives in the meta package, so call
AddVetoTheming() and AddVetoToast() instead - those two are the
only packages that register anything.
// Program.cs
using Veto;
builder.Services.AddVeto();3. Link the stylesheet
One stylesheet defines every design token. The boot script above it applies a remembered theme before the first paint - without it, a prerendered page renders light and then snaps to dark once WebAssembly starts.
<!-- App.razor or index.html, inside <head> -->
<script src="_content/Veto.Theming/veto-theme-init.js"></script>
<link rel="stylesheet" href="_content/Veto.Core/VetoStyles.css" />4. Import the namespaces
Add whichever you use to _Imports.razor.
@using Veto.Core
@using Veto.Theming
@using Veto.Components.Icon
@using Veto.Components.Code
@using Veto.Components.Buttons
@using Veto.Components.Layout
@using Veto.Components.TextBox
@using Veto.Components.Navigation
@using Veto.Layouts.ShellThat's it
Drop a component on a page to check everything is wired up.
<VetoTextBox TValue="string" Label="Project name" @bind-Value="_name" />
<VetoThemeToggle />