OFNEILL.HeroIcons
0.1.0
dotnet add package OFNEILL.HeroIcons --version 0.1.0
NuGet\Install-Package OFNEILL.HeroIcons -Version 0.1.0
<PackageReference Include="OFNEILL.HeroIcons" Version="0.1.0" />
<PackageVersion Include="OFNEILL.HeroIcons" Version="0.1.0" />
<PackageReference Include="OFNEILL.HeroIcons" />
paket add OFNEILL.HeroIcons --version 0.1.0
#r "nuget: OFNEILL.HeroIcons, 0.1.0"
#:package OFNEILL.HeroIcons@0.1.0
#addin nuget:?package=OFNEILL.HeroIcons&version=0.1.0
#tool nuget:?package=OFNEILL.HeroIcons&version=0.1.0
TailBlazor.HeroIcons
Tailwindcss HeroIcons for Blazor!
This package includes all 226 icons in the HeroIcon pack as of Version 0.4.1.
The full icon pack can be previewed here: HeroIcons.com
This pack allows you to modify: size, stroke(colour), stroke width, width and height, and style (outlined or solid) for all the icons in an easy package with easy searching of available icons.
Getting Setup
You can install the package via the NuGet package manager just search for TailBlazor.HeroIcons. You can also install via powershell using the following command.
Install-Package TailBlazor.HeroIcons
Or via the dotnet CLI.
dotnet add package TailBlazor.HeroIcons
1. Add Imports
Add line to your _Imports.razor
@using TailBlazor.HeroIcons
2. Create HeroIcon Component
Add TailBlazorHeroIcon
to your Blazor component and select the icon using HeroIcon
enum.
Due to enum limitations they have been modified to removed '-'. You now must specify a colour or the icon may not show up. This allows for styles to fall down into the component.
clipboard-copy
has been changed to ClipboardCopy
<TailBlazorHeroIcon Icon="HeroIcon.X" Class="text-blue-500" />
3. Customization
By default you don't need to include anything but the Icon
parameter. However if you want to customize aspects of the icon you can. by default they all have base values. The follow parameters are available
Parameter | Default Value |
---|---|
Width |
64 |
Height |
64 |
StrokeWidth |
2 |
Class |
text-black |
IconStyle |
IconStyle.Outline |
EnableComments |
false |
Width, Height, and StrokeWidth all take an int.
class takes any tailwind text colour you've added to your project: text-blue-500
. The fill is erased when building the SVG and this is put at a class instead. Because this is set as a class inside the class
variable you can add additional classes to further customize the icon.
<TailBlazorHeroIcon class="text-purple-300 transform rotate-45" Icon="HeroIcon.Share" />
By adding the transform rotate-45 to the class the icon will also be rotated 45 degrees. You can also add animation classes.
IconStyle accepts .Outline
and .Solid
when comments are enabled they can allow it easier for you to remember what you've used when inspecting an element for debugging. Enabling it shows the following comment above the icon.
``
SPECIAL NOTE TO PURGING TAILWINDCSS.
Sometimes we don't use all the styles and tailwind will purge them. If you find your icon's not styling, make sure stroke-current is added to your website tailwindcss purged code.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. 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. |
-
net5.0
- Microsoft.AspNetCore.Components (>= 5.0.2)
- Microsoft.AspNetCore.Components.Web (>= 5.0.1)
- Microsoft.AspNetCore.WebUtilities (>= 2.2.0)
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 |
---|---|---|
0.1.0 | 489 | 7/22/2025 |