AeonSake.Blazor.Icons.Lucide.Generated
1.87.0
Prefix Reserved
dotnet add package AeonSake.Blazor.Icons.Lucide.Generated --version 1.87.0
NuGet\Install-Package AeonSake.Blazor.Icons.Lucide.Generated -Version 1.87.0
<PackageReference Include="AeonSake.Blazor.Icons.Lucide.Generated" Version="1.87.0" />
<PackageVersion Include="AeonSake.Blazor.Icons.Lucide.Generated" Version="1.87.0" />
<PackageReference Include="AeonSake.Blazor.Icons.Lucide.Generated" />
paket add AeonSake.Blazor.Icons.Lucide.Generated --version 1.87.0
#r "nuget: AeonSake.Blazor.Icons.Lucide.Generated, 1.87.0"
#:package AeonSake.Blazor.Icons.Lucide.Generated@1.87.0
#addin nuget:?package=AeonSake.Blazor.Icons.Lucide.Generated&version=1.87.0
#tool nuget:?package=AeonSake.Blazor.Icons.Lucide.Generated&version=1.87.0
Lucide Blazor Icons (Source Generated)
A blazor component package for Lucide icons (lucide.dev), automatically updated every 12h.
Unlike AeonSake.Blazor.Icons.Lucide, this package contains a source generator that only adds the icons that are actually used in your project.
Usage
All icons are available through the LucideIcons enum and are rendered with the LucideIcon component:
@using AeonSake.Blazor.Icons.Lucide.Generated
<LucideIcon Icon="LucideIcons.House" />
<LucideIcon Icon="LucideIcons.Settings" Color="red" StrokeWidth="1.5" Class="my-icon" />
Icons are detected in C# code (any reference to a LucideIcons member) and in .razor/.cshtml markup (LucideIcons.<Name>).
Including icons that aren't referenced
If an icon is only determined at runtime (e.g., parsed from a string or loaded from configuration), it isn't referenced anywhere and won't be generated. Use the IncludeLucideIcons attribute to force-include it:
[assembly: IncludeLucideIcons(LucideIcons.House, LucideIcons.Settings)]
The attribute can also be placed on classes, members, etc. LucideIconRegistry.IsAvailable(icon) can be used to check whether an icon was generated.
Icons that weren't generated render as an empty svg element.
Libraries
Each project that references this package generates the icons it uses itself, so icons used in a Razor class library are available in every app that uses the library.
Renamed and removed icons
Enum values are tracked across Lucide releases and never reassigned to another icon, so libraries compiled against an older package version keep working. Whenever Lucide renames an icon (e.g. Home → House), the old icon remains available as [Obsolete], with an alias to the new icon.
Installation
The library is available as NuGet package on nuget.org and this project's GitLab Package Registry.
Building from Source
Building this project requires .NET 8.0 SDK or newer. Refer to the full list of supported frameworks to see more.
Some packages are loaded from external sources (nuget.org) and are required for compilation. Make sure to run nuget restore (or Restore NuGet packages from inside Visual Studio) before building.
Credits and Licenses
The following list contains all external tools and libraries. The project itself is licensed under MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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. |
-
net10.0
- AeonSake.Blazor.Icons (>= 1.3.0)
-
net8.0
- AeonSake.Blazor.Icons (>= 1.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.