NgIcons.Ionicons
33.0.1
dotnet add package NgIcons.Ionicons --version 33.0.1
NuGet\Install-Package NgIcons.Ionicons -Version 33.0.1
<PackageReference Include="NgIcons.Ionicons" Version="33.0.1" />
<PackageVersion Include="NgIcons.Ionicons" Version="33.0.1" />
<PackageReference Include="NgIcons.Ionicons" />
paket add NgIcons.Ionicons --version 33.0.1
#r "nuget: NgIcons.Ionicons, 33.0.1"
#:package NgIcons.Ionicons@33.0.1
#addin nuget:?package=NgIcons.Ionicons&version=33.0.1
#tool nuget:?package=NgIcons.Ionicons&version=33.0.1
ngIcons for Blazor
A collection of 76,000+ icons from ng-icons-for-blazor packaged as .NET libraries for Blazor applications.
Overview
This project extracts SVG icons from the popular ng-icons Angular library and makes them available for Blazor developers. You can either:
- Install NuGet packages - Reference icon libraries as dependencies in your Blazor project
- Copy individual icons - Use the demo site to browse and copy icon markup directly into your components
Available Icon Libraries
| Library | NuGet Package |
|---|---|
| Akar Icons | NgIcons.AkarIcons |
| Bootstrap Icons | NgIcons.BootstrapIcons |
| Boxicons | NgIcons.Boxicons |
| Circum Icons | NgIcons.CircumIcons |
| Cryptocurrency Icons | NgIcons.CryptocurrencyIcons |
| CSS.gg | NgIcons.CssGg |
| Devicon | NgIcons.Devicon |
| Dripicons | NgIcons.Dripicons |
| Feather Icons | NgIcons.FeatherIcons |
| Flag Icons | NgIcons.FlagIcons |
| Font Awesome | NgIcons.FontAwesome |
| Game Icons | NgIcons.GameIcons |
| Heroicons | NgIcons.Heroicons |
| Huge Icons | NgIcons.HugeIcons |
| Iconoir | NgIcons.Iconoir |
| Iconsax | NgIcons.Iconsax |
| Ionicons | NgIcons.Ionicons |
| Jam Icons | NgIcons.JamIcons |
| Lets Icons | NgIcons.LetsIcons |
| Lucide | NgIcons.Lucide |
| Material File Icons | NgIcons.MaterialFileIcons |
| Material Icons | NgIcons.MaterialIcons |
| Material Symbols | NgIcons.MaterialSymbols |
| Mynaui | NgIcons.Mynaui |
| Octicons | NgIcons.Octicons |
| Phosphor Icons | NgIcons.PhosphorIcons |
| Radix Icons | NgIcons.RadixIcons |
| Remixicon | NgIcons.Remixicon |
| Simple Icons | NgIcons.SimpleIcons |
| Solar Icons | NgIcons.SolarIcons |
| SVGL | NgIcons.Svgl |
| Tabler Icons | NgIcons.TablerIcons |
| TDesign Icons | NgIcons.TdesignIcons |
| Typicons | NgIcons.Typicons |
| UX Aspects | NgIcons.UxAspects |
Usage
Using NuGet Packages
Install the icon library you need:
dotnet add package NgIcons.Heroicons
Then use icons in your Blazor components:
@using HeroIconSet = NgIcons.Heroicons.IconSet
@using MaterialIconSet = NgIcons.MaterialIcons.IconSet
<button class="btn btn-primary">
@((MarkupString)HeroIconSet.heroArrowRight.WithSize(24))
Continue
</button>
<button class="btn btn-secondary">
@((MarkupString)MaterialIconSet.matSettings.WithSize(24))
Settings
</button>
Copying Icons Directly
Visit the demo site to:
- Browse all available icon libraries
- Search for icons by name
- Click on any icon to copy the SVG markup
- Paste directly into your Blazor component
Contributing
Updating Icons
Icons are extracted from the ng-icons npm packages using the extract-icons.ts script. To update the icons:
Prerequisites
- Node.js (v18 or later)
- npm
Steps
Install dependencies:
npm installUpdate ng-icons packages to the latest version (optional):
npm updateRun the extraction script:
npm run extract-icons
How the Extraction Script Works
The scripts/extract-icons.ts script performs the following:
Reads each ng-icons npm package - Iterates through all configured icon libraries in the
librariesarrayExtracts icon data - Loads the exported icon SVG strings from each package
Generates .NET files for each library:
Icons.json- A JSON file containing all icon names and their SVG content, embedded as a resourceIcons.g.cs- A C# class (IconSet) that provides:Allproperty - Returns all icons asIReadOnlyDictionary<string, IconDefinition>Get(name)/TryGet(name, out icon)methods - Retrieve a specific icon by name- Individual properties for each icon (e.g.,
heroArrowRight) for direct access with IntelliSense
Updates the .csproj file - Syncs the package version with the npm package version and ensures
Icons.jsonis embedded as a resourceUpdates the demo page title - Reflects the total icon count in the demo application
Adding a New Icon Library
To add support for a new ng-icons library:
Install the npm package:
npm install @ng-icons/new-libraryAdd an entry to the
librariesarray inscripts/extract-icons.ts:{ npm: '@ng-icons/new-library', project: 'NgIcons.NewLibrary' }Create a new .NET project:
dotnet new classlib -n NgIcons.NewLibrary -o src/NgIcons.NewLibraryAdd a reference to
NgIcons.Corein the new projectRun the extraction script:
npm run extract-icons
License
Icons are sourced from ng-icons and retain their original licenses. Please refer to each icon library's license for usage terms.
| 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
- NgIcons.Core (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.