Blazicons 2.2.39
dotnet add package Blazicons --version 2.2.39
NuGet\Install-Package Blazicons -Version 2.2.39
<PackageReference Include="Blazicons" Version="2.2.39" />
<PackageVersion Include="Blazicons" Version="2.2.39" />
<PackageReference Include="Blazicons" />
paket add Blazicons --version 2.2.39
#r "nuget: Blazicons, 2.2.39"
#:package Blazicons@2.2.39
#addin nuget:?package=Blazicons&version=2.2.39
#tool nuget:?package=Blazicons&version=2.2.39
Blazicons
Provides support for displaying SVG based icons in Blazor projects.
Check out the Demo Site.
Overview
Blazicons is a simple library consisting of one Blazor component, the Blazicon. A Blazicon component displays an SVG icon similar to how a font icon would be displayed.
Why Blazicons?
Why not just use font libraries to display icons? Blazicons provides a couple of benefits over using font icon libraries.
The first benefit is resource size. Blazicons is designed to leverage the SVG versions of the icons from popular icon libraries. Given Blazor's assembly trimming, only the icons used, rather than the entire library of icons are delivered to the client.
With Blazicons, an additional benefit is the ability to leverage intellisense. The various icons available in a given icon library are displayed with Visual Studio's intellisense options.
Getting Started
Select a Library
To get started using Blazicons, just install the Blazicons NuGet package of the desired icon library. The following options are currently among those available.
- Blazicons.Bootstrap
- Blazicons.Devicon
- Blazicons.FlagIcons
- Blazicons.FluentUI
- Blazicons.FontAwesome
- Blazicons.GoogleMaterialDesign
- Blazicons.Ionicons
- Blazicons.Lucide
- Blazicons.MaterialDesignIcons
Add Import
Next add the Blazicons reference to the _Imports.razor
file in the Blazor project.
@using Blazicons
Add Styles
There are two options for ensuring the Blazicons styles are available to the Blazor project. Most Blazor applications support scoped CSS. In these instances it is recommended to just ensure that the project styles.css file is referenced in the head tag section of the index.html/_Host.cshtml file.
<link href="My.App.styles.css" rel="stylesheet" />
As an alternative, the Blazicons CSS styles can be directly referenced in the index.html/_Host.cshtml file.
<link href="_content/Blazicons/css/blazicons.min.css" rel="stylesheet" />
Add a Blazicon
Finally, add the Blazicon component to your Blazor pages/components.
<Blazicon Svg="MdiIcon.Information"></Blazicon>
Parameters
Each parameter in a Blazor component has a rendering cost. Since it might be desirable to have many Blazicons on a page, maybe even in some sort of repeater control, one of the core principal when creating Blazicons was to limit the number of parameters.
As a result, a Blazicon only has one parameter, Svg
. The Svg
parameter is a special type of SvgIcon
. These SvgIcon
types are defined in the specific icon library Blazicon files.
Styling
A Blazicon is designed to be displayed with the size and color determined by current font size and color settings. Therefore, the size and color can easily be changed by adjusting the CSS font-size
and color
style attributes of the containing element.
<div style="font-size 200%; color: #f00;">
<Blazicon Svg="Ionicon.ShapesSharp"></Blazicon>
</div>
Styling helper methods also are available on the SvgIcon
object.
<Blazicon Svg='Ionicon.ShapesSharp.WithColor("#f00").WithSize("200%")'></Blazicon>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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. |
-
net6.0
- BlazorComponentUtilities (>= 1.8.0)
- Microsoft.AspNetCore.Components.Web (>= 6.0.36)
NuGet packages (10)
Showing the top 5 NuGet packages that depend on Blazicons:
Package | Downloads |
---|---|
Blazicons.MaterialDesignIcons
Provides the Material Design Icons icon library packaged as Blazicons, SVG icon components for Blazor. |
|
Blazicons.FontAwesome
Provides the Font Awesome icon library packaged as Blazicons, SVG icon components for Blazor. |
|
Blazicons.FluentUI
Provides the Fluent UI icon library packaged as Blazicons, SVG icon components for Blazor. |
|
Blazicons.Bootstrap
Provides the Bootstrap icon library packaged as Blazicons, SVG icon components for Blazor. |
|
Blazicons.Ionicons
Provides the Ionicons icon library packaged as Blazicons, SVG icon components for Blazor. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
2.2.39 | 624 | 6/28/2025 |
2.2.39-beta | 78 | 6/28/2025 |
2.1.36-beta | 88 | 6/28/2025 |
2.1.32-alpha | 139 | 6/25/2025 |
2.1.31-alpha | 131 | 6/25/2025 |
2.1.30 | 19,333 | 12/5/2024 |
2.1.30-beta | 108 | 12/5/2024 |
2.1.29-alpha | 114 | 12/5/2024 |
2.0.28 | 73,278 | 4/28/2024 |
2.0.28-beta | 123 | 4/28/2024 |
2.0.26-alpha | 140 | 4/24/2024 |
2.0.24-alpha | 142 | 4/11/2024 |
2.0.23-alpha | 141 | 4/11/2024 |
2.0.22-alpha | 139 | 4/10/2024 |
1.2.20 | 7,168 | 10/30/2023 |
1.2.20-beta | 150 | 10/30/2023 |
1.1.17-beta | 345 | 5/10/2023 |
1.1.14 | 5,829 | 1/24/2023 |
1.1.14-beta | 237 | 1/24/2023 |
1.1.12-alpha | 220 | 1/23/2023 |
1.0.10 | 970 | 1/3/2023 |
1.0.10-beta | 245 | 1/3/2023 |
1.0.8-alpha | 356 | 1/2/2023 |
1.0.7-alpha | 219 | 1/2/2023 |
1.0.6-alpha | 220 | 1/2/2023 |
0.1.3-alpha | 354 | 12/22/2022 |