ShellIcons.Blazor 0.2.0-alpha

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

ShellIcons

ShellIcons.Blazor

1,555 Lucide-derived icons for Blazor as inline <svg>: zero JS, zero required CSS, typed components that trim per icon. Docs: shellicons.shellui.dev.

Install

dotnet add package ShellIcons.Blazor

Targets net8.0 and net9.0 (and net10.0 via forward compatibility). No CSS import, no JS.

Pick your API

Four ways to render an icon — all produce identical SVG. Only the first two are safe to use next to a UI kit.

API Import Collides with UI kits? Tree-shakeable? Use for
<ChevronRightIcon /> suffixed component @using ShellIcons ✅ No ✅ Yes Default for markup. Reads as an icon, full parameter binding.
@Icon.ChevronRight() factory @using ShellIcons ✅ No ✅ Yes Icons as values — RenderFragment parameters, nav-item lists, configs.
<ShellIcon Name="chevron-right" /> dispatcher @using ShellIcons ✅ No ❌ Roots all 1,555 Names only known at runtime (CMS, JSON, markdown).
<ChevronRight /> flat component @using ShellIcons.Icons ⚠️ Yes — RZ9985 on Badge, Table, Menu, Router, Card… ✅ Yes Icon-only files with no UI kit imported.

One @using ShellIcons in _Imports.razor gives you the first three.

Every icon is also emitted as {Name}Icon in the root ShellIcons namespace. The suffix keeps names clear of UI-kit components and tells readers "this is an icon" at a glance — the same alias lucide-react ships.

@using ShellIcons

<ChevronRightIcon />
<ZapIcon Size="16" StrokeWidth="1.5" />
<TriangleAlertIcon Class="text-warning" />
<XIcon Title="Close dialog" />

One exception: Lucide's shell icon would be ShellIcon, which is the dispatcher, so it has no suffixed form — use @Icon.Shell().

@Icon.ChevronRight() — factory (icons as values)

Every icon has a static method on Icon returning a RenderFragment. Use it wherever an icon is data rather than markup:

@* A component parameter typed RenderFragment *@
<NavItem Href="/" Label="Home" Icon="@Icon.House()" />

@* A list built in C# *@
@code {
    private readonly (string Label, RenderFragment Icon)[] _items =
    [
        ("Inbox",    Icon.Inbox()),
        ("Settings", Icon.Settings(size: "16")),
    ];
}

A call with no arguments returns a cached fragment, so @Icon.Plus() in a hot render path doesn't allocate.

<ShellIcon Name="…" /> — dispatcher

Runtime lookup by kebab-case name, for icons whose identity is data-driven. Referencing it roots the full catalog, so prefer the two forms above when the name is known at compile time.

<ShellIcon Name="chevron-right" />
<ShellIcon Name="@page.IconName" Size="20" />

<ChevronRight /> — flat components (⚠️ RZ9985 trap)

@using ShellIcons.Icons puts all 1,555 unprefixed names into your tag lookup. With a UI kit that has Badge, Table, Router, etc., you get RZ9985 collisions.

Workarounds that don't work (verified by real integrators):

  • @using Icon = ShellIcons.Icons then <Icon.Plus /> — Razor's tag matcher ignores namespace aliases; the tag compiles as an unknown HTML element and renders blank.
  • Type aliases (@using Badge = MyApp.UI.Badge) — ignored by the tag matcher too.

Use the suffixed components instead, or fully qualify: <ShellIcons.Icons.ChevronRight />.

Using icons inside component libraries

Buttons and similar containers — just put the icon in the content. No Icon slot needed; the component's CSS sizes child SVGs (shadcn's [&_svg]:size-4):

<Button><ChevronRightIcon /> Next</Button>

Components that place the icon somewhere specific (input adornments, alerts, nav items) take a RenderFragment parameter — pass the factory:

<Input StartIcon="@Icon.Search()" Placeholder="Search…" />

Click handlers

Put handlers on a wrapping <button> — screen readers expect that. If you must attach one to the icon itself, drop the @:

<button @onclick="Save" aria-label="Save"><SaveIcon /></button>   @* ✅ recommended *@
<SaveIcon onclick="@(() => Save())" />                             @* ✅ works *@
<SaveIcon @onclick="Save" />                                       @* ❌ throws — see below *@

On a component, Razor passes @onclick="Save" as a plain string named @onclick; the browser then rejects that attribute name and the render batch fails. ShellIcons throws a clear InvalidOperationException instead. For the factory, the dictionary key is "onclick" (no @):

@Icon.Bell(additionalAttributes: new Dictionary<string, object>
{
    ["onclick"] = EventCallback.Factory.Create(this, HandleClick),
    ["data-testid"] = "notifications",
})

Colors and accessibility

Colors inherit from CSS color (stroke="currentColor"):

<span style="color: crimson"><TriangleAlertIcon Size="20" /></span>

Without Title icons are decorative (aria-hidden="true"); with it they get role="img" + <title>:

<XIcon Title="Close dialog" />

Licensing

MIT. Lucide-derived icons are ISC; attribution is in NOTICE.md inside the package.

Product 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 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 (1)

Showing the top 1 NuGet packages that depend on ShellIcons.Blazor:

Package Downloads
ShellDocs.Components

Blazor RCL for ShellDocs: DocsLayout, sidebar, header, search, TOC, version and package selectors, plus content primitives (Callout, Card, Steps, Tabs, CodeGroup, FileTree, TypeTable, live component previews).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0-alpha 59 10/23/2026
0.1.0-alpha 268 8/22/2026