heroicons 1.0.0

dotnet add package heroicons --version 1.0.0
                    
NuGet\Install-Package heroicons -Version 1.0.0
                    
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="heroicons" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="heroicons" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="heroicons" />
                    
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 heroicons --version 1.0.0
                    
#r "nuget: heroicons, 1.0.0"
                    
#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 heroicons@1.0.0
                    
#: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=heroicons&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=heroicons&version=1.0.0
                    
Install as a Cake Tool

Heroicons for Blazor

A Blazor component wrapper for Heroicons, the beautiful hand-crafted SVG icons by the makers of Tailwind CSS.

This project is a fork that provides Blazor components for all Heroicons, making them easy to use in Blazor applications. All icons and designs are created by the original Heroicons team at Tailwind Labs.

Installation

Install the package from NuGet:

dotnet add package heroicons

Usage

Basic Usage

Import the namespace in your _Imports.razor:

@using heroicons

Then use the HeroIcon component in your Blazor pages:

<HeroIcon Type="IconType.AcademicCap" Style="IconStyle.Outline" Size="IconSize.Regular" />

Icon Styles

Icons are available in two styles:

  • Outline - 24x24 outline icons (only available in Regular size)
  • Solid - Available in all sizes (16x16, 20x20, and 24x24)

Icon Sizes

Available sizes:

  • IconSize.Micro - 16x16 (solid only)
  • IconSize.Mini - 20x20 (solid only)
  • IconSize.Regular - 24x24 (outline and solid)

Examples


<HeroIcon Type="IconType.Bell" Style="IconStyle.Outline" Size="IconSize.Regular" />


<HeroIcon Type="IconType.Heart" Style="IconStyle.Solid" Size="IconSize.Mini" />


<HeroIcon Type="IconType.Star" Style="IconStyle.Solid" Size="IconSize.Micro" class="text-yellow-500" />


<HeroIcon Type="IconType.ArrowRight" 
          Style="IconStyle.Solid" 
          Size="IconSize.Regular" 
          class="text-blue-500 hover:text-blue-700" 
          @onclick="HandleClick" />

Direct Component Usage

You can also use icon components directly:

@using heroicons.Regular.Outline

<BellIcon class="w-6 h-6 text-gray-500" />
@using heroicons.Mini.Solid

<HeartIcon class="w-5 h-5 text-red-500" />
@using heroicons.Micro.Solid

<StarIcon class="w-4 h-4 text-yellow-500" />

Styling

Icons are preconfigured to be styled by setting the color CSS property, either manually or using utility classes like text-gray-500 in a framework like Tailwind CSS.


<HeroIcon Type="IconType.CheckCircle" 
          Style="IconStyle.Solid" 
          Size="IconSize.Regular" 
          class="text-green-500" />


<HeroIcon Type="IconType.ExclamationTriangle" 
          Style="IconStyle.Outline" 
          Size="IconSize.Regular" 
          style="color: #f59e0b;" />

Available Icons

The IconType enum includes all available icons. Some examples:

  • IconType.AcademicCap
  • IconType.AdjustmentsHorizontal
  • IconType.AdjustmentsVertical
  • IconType.ArchiveBox
  • IconType.ArrowDown
  • IconType.ArrowLeft
  • IconType.ArrowRight
  • IconType.ArrowUp
  • IconType.Bell
  • IconType.Calendar
  • IconType.Camera
  • IconType.ChatBubbleLeft
  • IconType.Check
  • IconType.ChevronDown
  • IconType.ChevronLeft
  • IconType.ChevronRight
  • IconType.ChevronUp
  • IconType.Clock
  • IconType.Cloud
  • IconType.Cog
  • IconType.CreditCard
  • IconType.Document
  • IconType.Download
  • IconType.Envelope
  • IconType.ExclamationCircle
  • IconType.ExclamationTriangle
  • IconType.Eye
  • IconType.Filter
  • IconType.Fire
  • IconType.Folder
  • IconType.Globe
  • IconType.Heart
  • IconType.Home
  • IconType.InformationCircle
  • IconType.Key
  • IconType.LightBulb
  • IconType.Link
  • IconType.LockClosed
  • IconType.MagnifyingGlass
  • IconType.Map
  • IconType.Menu
  • IconType.Microphone
  • IconType.Moon
  • IconType.PaperAirplane
  • IconType.PaperClip
  • IconType.Pencil
  • IconType.Phone
  • IconType.Photo
  • IconType.Plus
  • IconType.Printer
  • IconType.QuestionMarkCircle
  • IconType.Save
  • IconType.Search
  • IconType.Settings
  • IconType.Share
  • IconType.ShoppingCart
  • IconType.Star
  • IconType.Sun
  • IconType.Tag
  • IconType.Trash
  • IconType.User
  • IconType.UserGroup
  • IconType.VideoCamera
  • IconType.Wifi
  • IconType.XMark
  • And many more...

The full list of available icons can be found at heroicons.com.

Requirements

  • .NET 9.0 or later
  • Blazor WebAssembly or Blazor Server

License

This library is MIT licensed.

Credits

All icon designs are created by the Heroicons team at Tailwind Labs.

This Blazor wrapper is an unofficial port and is not affiliated with Tailwind Labs.

Product 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.  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.0 149 5/26/2025