dotnet add package LucideBlazorUse strongly typed components when you know which icon you need:
<HomeIcon Size="32" Stroke="blue" />
<SearchIcon ClassName="my-icon" />Or use dynamic lookup when you need flexibility:
<LucideIcon Name="user" Size="24" />
<LucideIcon Name="@iconName" />All icons support these parameters:
Size- Width/height in pixels (default: 24)Stroke- Stroke color (default: "currentColor")StrokeWidth- Line thickness (default: 2)Fill- Fill color (default: "none")StrokeLineCap/StrokeLineJoin- Line stylingClassName- CSS classes- Any additional HTML attributes
<HeartIcon Size="48" Stroke="red" Fill="pink" />
<AlertCircleIcon ClassName="text-warning me-2" />
<InfoIcon id="tooltip" data-toggle="tooltip" />A source generator reads Lucide's SVG files at compile time and generates icon components with the SVG content baked in. This means fast rendering and small bundle sizes when you publish with trimming enabled.
This is a small and new project so contributions, bug reports, and ideas are welcome.
LucideBlazor is released under the MIT License. For lucides license have a look here