Tabler Icons

repository·main·Indexed 11 days ago

https://github.com/tabler/tabler-icons

A large collection of MIT-licensed SVG icons designed on a 24x24 grid with a 2px stroke. Version 3.46.0 provides raw SVGs, icon fonts, and tree-shakable framework-specific components for React, Vue, Angular, Svelte, SolidJS, Preact, and Astro, as well as assets in EPS, PDF, PNG, and sprite formats.

Tokens
15.7K
Snippets
99
Records
114
Agent score
93%

What's inside Tabler Icons

  1. Use the filled version of icons

    main

    Tabler Icons provides a "filled" version of certain icons. These icons use the fill="currentColor" attribute on their internal paths and typically set stroke-width="0" to achieve a solid look. You can identify these in the library by their naming convention (e.g., icon-tabler-bell-filled).

    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-lg icon-tabler icon-tabler-bell-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
      <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
      <path d="M14.235 19c.865 0 1.322 1.024 .745 1.668a3.992 3.992 0 0 1 -2.98 1.332a3.992 3.992 0 0 1 -2.98 -1.332c-.552 -.616 -.158 -1.579 .634 -1.661l.11 -.006h4.471z" stroke-width="0" fill="currentColor"></path>
      ...
    </svg>
  2. How to use Tabler Icons in Angular

    main

    The package is tree-shakable, allowing you to choose exactly which icons to include in your bundle. There are two primary ways to use icons:

    1. Using the provider (by name): Register icons via provideTablerIcons() and use their string names in templates. This is recommended for standalone applications.
    2. Passing an icon object (by reference): Import the specific Icon... symbol and bind it directly to the [icon] input. This method does not require a provider.

    Icons are exported as Icon… named symbols from @tabler/icons-angular.

  3. Install the EPS version of Tabler Icons

    main

    You can install the EPS version of Tabler Icons via npm using the @tabler/icons-eps package, or by downloading the files directly from the GitHub releases page. Once installed, all EPS files are located in the icons subdirectory.

    npm install @tabler/icons-eps
  4. Compile Tabler Icon Fonts

    main

    To compile custom icon fonts, you need fontforge installed. The build process uses a compile-options.json file in the root directory to configure the output.

    Configuration Options (compile-options.json)

    • fontForge: Path to the fontforge executable. Defaults to fontforge in PATH.
    • strokeWidth: The stroke width for the font. Defaults to 2.
    • includeIcons: Array of specific icon names to include. If empty, all icons are compiled.
    • includeCategories: Array or string of icon categories to include (case-insensitive).
    • excludeIcons: Array of icon names to exclude.

    Example Configuration

    {
      "fontForge": "/Applications/FontForge.app/Contents/MacOS/FontForge",
      "strokeWidth": 1.5,
      "includeIcons": ["alert-octagon", "alert-triangle"],
      "includeCategories": ["devices", "system"],
      "excludeIcons": ["adjustments"]
    }

    Build Command

    npm run build-iconfont