Chris-Mingay / Blazor.Heroicons

A third-party Blazor component library for Heroicons.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blazor.Heroicons

A third-party Blazor component library for Heroicons.

Nuget package Heroicons version License

Basic Usage

First, install Blazor.Heroicons from nuget:

dotnet add package Blazor.Heroicons

Now each icon can be used as a Blazor component:

@using Blazor.Heroicons.Solid

<div>
  <BeakerIcon className="h-6 w-6 text-blue-500" />
  <p>...</p>
</div>

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

<Heroicon />

You can also reference an icon by name, using the Heroicon component:

@using Blazor.Heroicons

<Heroicon Name="@HeroiconName.Sparkles" Type="HeroiconType.Outline" class="h-6 w-6 text-yellow-600" />

Browse the full list of icons on Heroicons →

<RandomHeroicon />

If you want to get crazy, use the RandomHeroicon component to render a random icon:

@using Blazor.Heroicons

<RandomHeroicon Type="HeroiconType.Mini" class="h-6 w-6 text-green-700" />

Links

License

This library is MIT licensed.

About

A third-party Blazor component library for Heroicons.

License:MIT License


Languages

Language:HTML 94.7%Language:C# 4.3%Language:Python 0.9%