PrimerBlazor 1.0.2

dotnet add package PrimerBlazor --version 1.0.2
                    
NuGet\Install-Package PrimerBlazor -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PrimerBlazor" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PrimerBlazor" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="PrimerBlazor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PrimerBlazor --version 1.0.2
                    
#r "nuget: PrimerBlazor, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PrimerBlazor@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PrimerBlazor&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=PrimerBlazor&version=1.0.2
                    
Install as a Cake Tool

PrimerBlazor

A set of Blazor components styled with GitHub’s Primer CSS system.

πŸš€ Getting Started

PrimerBlazor is available for free on NuGet, and the demo-related source code is open-source on GitHub.

βœ… Install via NuGet (.NET 8+)

Install the package using the NuGet CLI:

dotnet add package PrimerBlazor

🎨 Import Global Styles

Add the following to your wwwroot/index.html (Blazor WebAssembly) or _Host.cshtml (Blazor Server):

<link href="_content/PrimerBlazor/css/style.css" rel="stylesheet" />

πŸ”Œ Register JS Interop

The JavaScript file primerBlazorJsInterop.js is automatically included by the PrimerBlazor package.

🌐 Blazor Web App (.NET 9+) Notes

When using PrimerBlazor in a .NET 9+ Blazor Web App, JavaScript modules are automatically registered using the built-in <script type="importmap"> mechanism.

You do not need to manually add the script reference for primerBlazorJsInterop.js:

<script type="importmap">{
  "imports": {
    "./_content/PrimerBlazor/js/primerBlazorJsInterop.js": "./_content/PrimerBlazor/js/primerBlazorJsInterop.wxyz1234.js"
  }
}</script>

However, CSS files are not included in the import map and must still be linked manually:

<link href="_content/PrimerBlazor/css/style.css" rel="stylesheet" />

Also, register the interop service in Program.cs to enable clipboard and dynamic UI behaviors:

builder.Services.AddScoped<PrimerBlazorJsInterop>();

πŸ“„ Add Imports

Include this line in your _Imports.razor file:

@using PrimerBlazor

🧩 Start Using Components

You can now use components like <PrimerBrandButton />, <PrimerBrandStack />, and more.

πŸͺͺ License

MIT Β© 2025 hyeonseok

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 111 5/18/2025
1.0.1 112 5/18/2025
1.0.0 333 5/13/2025 1.0.0 is deprecated because it has critical bugs.