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
                    
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="Kebechet.Blazor.Tabler.Icons" Version="3.40.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kebechet.Blazor.Tabler.Icons" Version="3.40.0" />
                    
Directory.Packages.props
<PackageReference Include="Kebechet.Blazor.Tabler.Icons" />
                    
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 Kebechet.Blazor.Tabler.Icons --version 3.40.0
                    
#r "nuget: Kebechet.Blazor.Tabler.Icons, 3.40.0"
                    
#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 Kebechet.Blazor.Tabler.Icons@3.40.0
                    
#: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=Kebechet.Blazor.Tabler.Icons&version=3.40.0
                    
Install as a Cake Addin
#tool nuget:?package=Kebechet.Blazor.Tabler.Icons&version=3.40.0
                    
Install as a Cake Tool

"Buy Me A Coffee"

Blazor.Icons.Tabler

NuGet Version NuGet Downloads Auto Update Last updated Twitter

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 - enum
  • TablerIconConstants.cs - constants
  • TablerIconTypeExtensions.cs - extension method
  • wwwroot/tabler-icons.min.css - stylesheet
  • wwwroot/fonts/*.woff2 - font files

Design Decisions

Enum + Constants + Switch Expression

We use three separate constructs for maximum flexibility and performance:

  • TablerIconType enum: Provides IntelliSense, compile-time safety, and easy discovery of available icons
  • TablerIconConstants: Direct string constants for scenarios where you need the raw CSS class
  • ToCssClass() 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-face rules 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: Ad2 not Ad_2

Versioning

<tabler_version>(.<fix_number>)

Examples:

  • 3.36.1 - matches Tabler Icons v3.36.1
  • 3.36.1.1 - patch release for package-level fixes

License

MIT - Same as Tabler Icons

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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