ShadCn.Blazor.Theme.Default
1.0.37
dotnet add package ShadCn.Blazor.Theme.Default --version 1.0.37
NuGet\Install-Package ShadCn.Blazor.Theme.Default -Version 1.0.37
<PackageReference Include="ShadCn.Blazor.Theme.Default" Version="1.0.37" />
<PackageVersion Include="ShadCn.Blazor.Theme.Default" Version="1.0.37" />
<PackageReference Include="ShadCn.Blazor.Theme.Default" />
paket add ShadCn.Blazor.Theme.Default --version 1.0.37
#r "nuget: ShadCn.Blazor.Theme.Default, 1.0.37"
#:package ShadCn.Blazor.Theme.Default@1.0.37
#addin nuget:?package=ShadCn.Blazor.Theme.Default&version=1.0.37
#tool nuget:?package=ShadCn.Blazor.Theme.Default&version=1.0.37
ShadCn.Blazor
ShadCn.Blazor is a Blazor component library inspired by shadcn/ui. It provides accessible, customizable, open source UI components for Blazor WebAssembly and Blazor Server, with a default theme driven by CSS variables. Components are pure Blazor and require no JavaScript/JS interop at runtime.
Highlights
- Built for .NET 8+ and both Blazor WebAssembly and Blazor Server.
- No JavaScript/JS interop required at runtime.
- Single package install.
- Dark mode support via a
darkclass on thehtmlelement. - Easy customization through CSS variables and a
Classparameter on components.
Prerequisites
- .NET 8.0 or later
- Blazor WebAssembly or Blazor Server project
Installation
1) Install NuGet package
dotnet add package ShadCn.Blazor.Components
Package Manager Console:
Install-Package ShadCn.Blazor.Components
2) Add the theme CSS
Add this to index.html (WebAssembly) or _Host.cshtml / App.razor (Server):
<link rel="stylesheet" href="_content/ShadCn.Blazor.Theme.Default/theme.css" />
The theme uses CSS variables for colors. Values are in HSL format without the hsl() wrapper.
3) Register services
Add this to Program.cs:
builder.Services.AddShadCnBlazorComponents();
Add using ShadCn.Blazor.Components; if needed.
4) Add component imports
Add component namespaces to your _Imports.razor:
@using ShadCn.Blazor.Components
@using ShadCn.Blazor.Components.Alert
@using ShadCn.Blazor.Components.Badge
@using ShadCn.Blazor.Components.Button
@using ShadCn.Blazor.Components.Card
@using ShadCn.Blazor.Components.Input
@using ShadCn.Blazor.Components.Separator
5) Use components
<Button>Click me</Button>
<Card>
<CardHeader>
<CardTitle>Welcome</CardTitle>
<CardDescription>Get started with ShadCn.Blazor</CardDescription>
</CardHeader>
<CardContent>
<p>Your content here</p>
</CardContent>
</Card>
Dark mode
Add the dark class to your html element:
<html class="dark">
...
</html>
You can toggle dark mode by adding/removing the class (for example via JavaScript or a persisted user preference).
Customization
All components accept a Class parameter for additional Tailwind CSS classes:
<Button Class="w-full">Full Width Button</Button>
<Card Class="max-w-md mx-auto">...</Card>
Override colors by redefining the CSS variables in your own stylesheet (loaded after theme.css). Values use HSL format without the hsl() wrapper:
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;
--radius: 0.5rem;
/* Sidebar (defaults inherit from the above) */
--sidebar: var(--background);
--sidebar-foreground: var(--foreground);
--sidebar-primary: var(--primary);
--sidebar-primary-foreground: var(--primary-foreground);
--sidebar-accent: var(--accent);
--sidebar-accent-foreground: var(--accent-foreground);
--sidebar-border: var(--border);
--sidebar-ring: var(--ring);
}
Override dark mode with .dark { ... }. Override fonts with @theme { --font-sans: ...; }.
Tip: use https://ui.shadcn.com/themes to generate color palettes, then copy the CSS variables into your project.
| 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. |
-
net10.0
- Microsoft.AspNetCore.Components.Web (>= 10.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ShadCn.Blazor.Theme.Default:
| Package | Downloads |
|---|---|
|
ShadCn.Blazor.Components
Blazor component library inspired by shadcn/ui. Accessible. Customizable. Open Source. All components are built as pure Blazor components and require no JavaScript or JS interop at runtime. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.37 | 1,670 | 3/18/2026 |
| 1.0.36 | 137 | 3/18/2026 |
| 1.0.35 | 147 | 3/17/2026 |
| 1.0.34 | 139 | 3/17/2026 |
| 1.0.33 | 151 | 3/17/2026 |
| 1.0.32 | 139 | 3/16/2026 |
| 1.0.31 | 139 | 3/13/2026 |
| 1.0.30 | 141 | 3/13/2026 |
| 1.0.29 | 133 | 3/13/2026 |
| 1.0.28 | 134 | 3/13/2026 |
| 1.0.27 | 145 | 3/13/2026 |
| 1.0.26 | 135 | 3/5/2026 |
| 1.0.25 | 129 | 3/4/2026 |
| 1.0.24 | 130 | 3/4/2026 |
| 1.0.23 | 140 | 3/4/2026 |
| 1.0.22 | 143 | 3/3/2026 |
| 1.0.21 | 136 | 3/3/2026 |
| 1.0.20 | 132 | 3/3/2026 |
| 1.0.19 | 138 | 3/3/2026 |
| 1.0.18 | 138 | 3/3/2026 |