Icons
DotBlaze.Icon renders Heroicons, Lucide, and Feather as inline SVG components. Install the package at the same version as DotBlaze; its provider is discovered automatically. No publish command, JavaScript, CDN, or runtime downloads are needed.
Complete example
dotnet add package DotBlaze.IconIn a .blade.html view:
<button type="button" aria-label="Favourite">
<x-heroicon-s-heart class="h-6 w-6 text-red-600" />
</button>
<x-lucide-heart class="h-6 w-6 text-red-600" aria-label="Favourite" />
<x-feather-heart class="h-6 w-6 text-red-600" stroke-width="1" />Each component becomes a root <svg> with the original artwork inside it. Only the icons used on the page appear in its HTML. Tailwind utility classes require Tailwind in your application; the icon package does not ship CSS. You can also use ordinary CSS or width and height attributes.
The same tags work in .cshtml views with the standard DotBlaze import (@addTagHelper *, DotBlaze). No icon-specific Tag Helper import is necessary.
Names
The component name is the pack prefix plus the SVG filename without .svg:
| Pack | Example | Bundled files |
|---|---|---|
| Heroicons | x-heroicon-s-heart, x-heroicon-o-heart, x-heroicon-m-heart, x-heroicon-c-heart | 1288 |
| Lucide | x-lucide-heart | 2449 |
| Feather | x-feather-heart | 286 |
Heroicons includes solid (s, 24px), outline (o, 24px), mini (m, 20px), and micro (c, 16px) variants. Lucide includes the requested resources/svg/icons catalog, not the experimental lab directory. Names are case-sensitive. An unknown icon under a supported prefix raises a descriptive exception.
The heroicon-, lucide-, and feather- prefixes are owned by this package and resolved before view components. Other names, including x-ui.icon, retain their existing behavior. Local views under the reserved prefixes do not override bundled icons.
Attributes and accessibility
Attributes are forwarded to the root SVG. Caller attributes override source defaults; class combines source classes first and caller classes second. Geometry, viewBox, and source paint attributes are preserved unless explicitly overridden. Attribute values are HTML-encoded. Templates remain trusted application code: do not pass untrusted attribute names or event handlers.
Icons default to aria-hidden="true" and focusable="false". Give meaningful standalone icons an aria-label or aria-labelledby: the renderer removes the source's default aria-hidden and supplies role="img". Explicit caller values for aria-hidden, role, or focusable take precedence. Put the accessible label on an icon-only button rather than on its decorative icon.
Dynamic attribute values use ordinary Blade expressions:
<x-lucide-heart class="h-6 w-6" aria-label="{{ Model.Label }}" />This release resolves icon names from literal component tags; it does not add a variable-name x-dynamic-component API, custom uploaded SVGs, or a publishing command. Icon tags are leaf components: use attributes rather than child content or named slots.
Assets and licenses
All 4,023 SVG files are embedded in the assembly and read locally. Parsed source SVGs are cached on first use; per-render attributes are not cached. Package size includes all three packs regardless of how many your app uses.
See pinned sources and license provenance. Both the Blade wrapper licenses and original artwork licenses ship in the NuGet package. Updating the catalog is an explicit package update, not a network operation in a running app.