Kebechet.Blazor.Tabler.Icons
3.40.0
Prefix Reserved
dotnet add package Kebechet.Blazor.Tabler.Icons --version 3.40.0
NuGet\Install-Package Kebechet.Blazor.Tabler.Icons -Version 3.40.0
<PackageReference Include="Kebechet.Blazor.Tabler.Icons" Version="3.40.0" />
<PackageVersion Include="Kebechet.Blazor.Tabler.Icons" Version="3.40.0" />
<PackageReference Include="Kebechet.Blazor.Tabler.Icons" />
paket add Kebechet.Blazor.Tabler.Icons --version 3.40.0
#r "nuget: Kebechet.Blazor.Tabler.Icons, 3.40.0"
#:package Kebechet.Blazor.Tabler.Icons@3.40.0
#addin nuget:?package=Kebechet.Blazor.Tabler.Icons&version=3.40.0
#tool nuget:?package=Kebechet.Blazor.Tabler.Icons&version=3.40.0
Blazor.Icons.Tabler
A Blazor component library providing Tabler Icons (5000+ icons) with strongly-typed enums and constant-time lookups.
Automatically updated - A daily pipeline checks for new Tabler Icons releases and publishes updates automatically. No manual maintenance needed!
Installation
dotnet add package Kebechet.Blazor.Tabler.Icons
The CSS is automatically registered via Blazor's JavaScript initializers - no manual setup required.
Usage
Component
<TablerIcon Type="TablerIconType.Home" />
<TablerIcon Type="TablerIconType.Settings" Class="text-red" Style="font-size: 2rem" />
<TablerIcon Type="TablerIconType.User" @onclick="HandleClick" title="Profile" />
Direct CSS class
// Using the extension method
var css = TablerIconType.Activity.ToCssClass(); // "ti ti-activity"
// Using constants directly
var css = TablerIconConstants.Activity; // "ti ti-activity"
<i class="@TablerIconType.Home.ToCssClass()"></i>
<i class="@TablerIconConstants.Settings"></i>
API
| Type | Description |
|---|---|
TablerIcon |
Blazor component for rendering icons |
TablerIconType |
Enum with all 5000+ icon names |
TablerIconConstants |
Static class with CSS class string constants |
TablerIconTypeExtensions.ToCssClass() |
Extension method to convert enum to CSS class |
TablerIcon Component Parameters
| Parameter | Type | Description |
|---|---|---|
Type |
TablerIconType |
Required. The icon to display |
Class |
string? |
Additional CSS classes |
Style |
string? |
Inline styles |
Attributes |
Dictionary<string, object>? |
Captures unmatched attributes (@onclick, title, aria-*, etc.) |
Updating Icons
Run the PowerShell script to regenerate from the latest Tabler Icons:
.\scripts\Generate-TablerIcons.ps1
The script downloads the latest @tabler/icons-webfont npm package and generates:
TablerIconType.cs- enumTablerIconConstants.cs- constantsTablerIconTypeExtensions.cs- extension methodwwwroot/tabler-icons.min.css- stylesheetwwwroot/fonts/*.woff2- font files
Design Decisions
Enum + Constants + Switch Expression
We use three separate constructs for maximum flexibility and performance:
TablerIconTypeenum: Provides IntelliSense, compile-time safety, and easy discovery of available iconsTablerIconConstants: Direct string constants for scenarios where you need the raw CSS classToCssClass()extension: Uses a switch expression that maps enum to constants
The switch expression compiles to a jump table, providing O(1) constant-time lookup. No reflection, no dictionary lookups, no string interpolation at runtime.
Why not reflection or nameof()?
Reflection-based approaches (attributes, nameof()) have runtime overhead and require string manipulation. Our approach:
- Zero allocations for enum-to-string conversion
- Compile-time verification that all enum values are handled
- The compiler optimizes the switch expression into efficient IL
Font format: woff2 only
We include only .woff2 files, not .woff, .ttf, or .eot:
- woff2 has the best compression (~30% smaller than woff)
- Supported by all modern browsers (Chrome 36+, Firefox 39+, Safari 10+, Edge 14+)
- Legacy formats add ~10MB of unnecessary bloat
Font weights: regular + filled only
Tabler provides multiple font weights (200, 300, 400, filled), but we include only:
- Regular (400): The default weight
- Filled: Solid icon variants
The 200/300 weights were excluded because:
- The default CSS doesn't wire them up (no
@font-facerules for those weights) - They would require custom CSS to use
- Removing them saves ~850KB
Naming conventions
- Enum values use PascalCase:
TablerIconType.AddressBook - Names starting with numbers get underscore prefix:
TablerIconType._24Hours - No underscores between words:
Ad2notAd_2
Versioning
<tabler_version>(.<fix_number>)
Examples:
3.36.1- matches Tabler Icons v3.36.13.36.1.1- patch release for package-level fixes
License
MIT - Same as Tabler Icons
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Microsoft.AspNetCore.Components.Web (>= 10.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.40.0 | 74 | 3/7/2026 |
| 3.39.0 | 78 | 3/6/2026 |
| 3.38.0 | 86 | 3/2/2026 |
| 3.37.1 | 87 | 2/20/2026 |
| 3.36.2 | 573 | 1/10/2026 |
| 3.36.1 | 122 | 1/6/2026 |
| 3.36.1-preview4 | 353 | 1/6/2026 |
| 3.36.1-preview3 | 92 | 1/6/2026 |
Bumped to Tabler Icons v3.40.0