SysAdminsMedia.BlazorIconify
1.1.0
dotnet add package SysAdminsMedia.BlazorIconify --version 1.1.0
NuGet\Install-Package SysAdminsMedia.BlazorIconify -Version 1.1.0
<PackageReference Include="SysAdminsMedia.BlazorIconify" Version="1.1.0" />
paket add SysAdminsMedia.BlazorIconify --version 1.1.0
#r "nuget: SysAdminsMedia.BlazorIconify, 1.1.0"
// Install SysAdminsMedia.BlazorIconify as a Cake Addin #addin nuget:?package=SysAdminsMedia.BlazorIconify&version=1.1.0 // Install SysAdminsMedia.BlazorIconify as a Cake Tool #tool nuget:?package=SysAdminsMedia.BlazorIconify&version=1.1.0
SysAdminsMedia.BlazorIconify
BlazorIconify is a Blazor component library for Iconify, a unified icon framework that provides a consistent icon experience across all platforms. BlazorIconify is a wrapper around the Iconify API that allows you to easily add icons to your Blazor applications.
Installation
You can install BlazorIconify via NuGet. Run the following command in the Package Manager Console:
Install-Package SysAdminsMedia.BlazorIconify
or via the .NET Core CLI:
dotnet add package SysAdminsMedia.BlazorIconify
Usage
First, you need to add the following line to your _Imports.razor
file:
@using SysAdminsMedia.BlazorIconify
Add the following to program.cs:
builder.Services.AddBlazorIconify();
Then, you can use the Iconify
component in your Blazor components like this:
<Iconify Icon="mdi:home" />
You can also adjust the color and other properties of the icon:
<Iconify Icon="mdi:home" Color="red" Class="my-custom-class" Style="align-content: center;" />
Configuration Options
You can change the configuration to use a custom Iconify API endpoint, set a default icon color, or set a different error icon.
You simply need to set up the appsettings.json
file like this:
{
"Iconify": {
"ApiEndpoint": "https://custom-iconify-api-endpoint.com",
"DefaultColor": "blue",
"ErrorIcon": "mdi:alert"
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net9.0
- Blazored.LocalStorage (>= 4.5.0)
- Microsoft.AspNetCore.Components.Web (>= 9.0.1)
- Microsoft.Extensions.Configuration (>= 9.0.1)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.