Tabler Icons

A set of over 3000 free MIT-licensed high-quality SVG icons for you to use ...

README

Tabler Icons

A set of 3036 free MIT-licensed high-quality SVG icons for you to use in your web projects. Each icon is designed on a 24x24 grid and a 2px stroke.

Browse at tabler-icons.io →

Latest Release License



Sponsors


If you want to support my project and help me grow it, you can become a sponsor on GitHub or just donate on PayPal :)


Preview


Tabler Icons preview


Sponsor Tabler


Sponsor Tabler


Installation


  1. ```
  2. npm install @tabler/icons --save
  3. ```


Usage


All icons are built with SVG, so you can place them as ``, `background-image` and inline in HTML code.

HTML image


If you load an icon as an image, you can modify its size using CSS.

  1. ``` html
  2. <img src="path/to/icon.svg" alt="icon title" />
  3. ```

Inline HTML


You can paste the content of the icon file into your HTML code to display it on the page.

  1. ``` html
  2. <a href="">
  3.   <svg
  4.     xmlns="http://www.w3.org/2000/svg"
  5.     class="icon icon-tabler icon-tabler-disabled"
  6.     width="24"
  7.     height="24"
  8.     viewBox="0 0 24 24"
  9.     stroke-width="1.25"
  10.     stroke="currentColor"
  11.     fill="none"
  12.     stroke-linecap="round"
  13.     stroke-linejoin="round"
  14.   >
  15.     ...
  16.   </svg>
  17.   Click me
  18. </a>
  19. ```

Thanks to that, you can change the size, color and the stroke-width of the icons with CSS code.

  1. ```css
  2. .icon-tabler {
  3.   color: red;
  4.   width: 32px;
  5.   height: 32px;
  6.   stroke-width: 1.25;
  7. }
  8. ```

SVG sprite


Add an icon to be displayed on your page with the following markup (activity in the above example can be replaced with any valid icon name):

  1. ``` html
  2. <svg width="24" height="24">
  3.   <use xlink:href="path/to/tabler-sprite.svg#tabler-activity" />
  4. </svg>
  5. ```

React


Import the icon and render it in your component. You can adjust SVG properties through React props:

  1. ``` js
  2. import { IconAward } from '@tabler/icons';

  3. const MyComponent = () => {
  4.   return <IconAward
  5.     size={36} // set custom `width` and `height`
  6.     color="red" // set `stroke` color
  7.     stroke={3}  // set `stroke-width`
  8.     strokeLinejoin="miter" // override other SVG props
  9.   />
  10. }
  11. ```

@tabler/icons exports it's own type declarations for usage with React and Typescript.

Angular


Angular components available through [angular-tabler-icons](https://www.npmjs.com/package/angular-tabler-icons) package.  
Install the package, then create icons module:

  1. ```ts  
  2. import { NgModule } from '@angular/core';

  3. import { TablerIconsModule } from 'angular-tabler-icons';
  4. import { IconCamera, IconHeart, IconBrandGithub } from 'angular-tabler-icons/icons';

  5. // Select some icons (use an object, not an array)
  6. const icons = {
  7.   IconCamera,
  8.   IconHeart,
  9.   IconBrandGithub
  10. };

  11. @NgModule({
  12.   imports: [
  13.     TablerIconsModule.pick(icons)
  14.   ],
  15.   exports: [
  16.     TablerIconsModule
  17.   ]
  18. })
  19. export class IconsModule { }
  20. ```

After importing the _IconsModule_ in your feature or shared module, use the icons as follows:

  1. ``` html
  2. <i-tabler name="camera"></i-tabler>
  3. <i-tabler name="heart" style="color: red;"></i-tabler>
  4. <i-tabler name="brand-github" class="someclass"></i-tabler>
  5. ```

angular-tabler-icons exports it's own type declarations for usage with Typescript.

For more usage documentation refer to the official documentation.

Vue


Vue components available through [vue-tabler-icons](https://www.npmjs.com/package/vue-tabler-icons) package.
Install the package, import the icon component and render it in your component. You can adjust SVG properties by passing regular HTML attributes:

  1. ``` html
  2. <script>
  3.     // MyComponent.vue
  4.     import { BoldIcon } from 'vue-tabler-icons';
  5.     export default {
  6.         components: { BoldIcon },
  7.     };
  8. </script>
  9. <template>
  10.     <bold-icon />
  11. </template>
  12. ```

vue-tabler-icons exports it's own type declarations for usage with Typescript.

For more usage documentation refer to the official documentation.

CDN


All files included in @tabler/icons npm package are available over a CDN.

React icons


  1. ``` html
  2. <script src="https://cdn.jsdelivr.net/npm/@tabler/icons@latest/icons-react/dist/index.umd.min.js"></script>
  3. ```

Iconfont


  1. ``` html
  2. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/icons@latest/iconfont/tabler-icons.min.css">
  3. ```

To load a specific version replace latest with the desired version number.

  1. ``` html
  2. <script src="https://cdn.jsdelivr.net/npm/@tabler/icons@1.74.0/icons-react/dist/index.umd.min.js"></script>
  3. ```

HTML
  1. ``` html
  2. <i class="ti ti-brand-tabler"></i>
  3. ```

CSS
  1. ```css
  2. content: 'ec8f';
  3. ```


Compiling fonts


To compile fonts first install fontforge.

When compiling the font it will look for a json file compile-options.json in root folder (same folder as the package.json) In this file you can define extra options:

The default settings if you have not defined the file will be:
  1. ``` jsON
  2. {
  3.   "includeIcons": [],
  4.   "fontForge": "fontforge",
  5.   "strokeWidth": null
  6. }
  7. ```

The fontforge executable needs to be in the path or you can set the path to the downloaded fontforge executable in the configuration file. If you installed in on a mac in your application directory it will be /Applications/FontForge.app/Contents/MacOS/FontForge. You can set this value in the compile-options.json file.

  1. ``` jsON
  2. {
  3.   "fontForge": "/Applications/FontForge.app/Contents/MacOS/FontForge"
  4. }
  5. ```

To compile the fonts run:
  1. ```sh
  2. npm run build-iconfont
  3. ```

By default the stroke width is 2. You can change the stroke width in the compile-options.json
  1. ``` jsON
  2. {
  3.   "strokeWidth": 1.5,
  4. }
  5. ```

To reduce the font file size you can choose to compile a sub set of icons. When you leave the array empty it will compile all the fonts. To compile only two icons you can set for example the folowing option in the compile-options.json:

  1. ``` jsON
  2. {
  3.   "includeIcons": ["alert-octagon", "alert-triangle"]
  4. }
  5. ```

Optional property includeCategories - an array or string of icon categories to include, category names are case-issensetive.
  1. ``` jsON
  2. {
  3.   "includeCategories": ["Devices", "System"]
  4. }
  5. ```
or
  1. ``` jsON
  2. {
  3.   "includeCategories": "Devices System"
  4. }
  5. ```

Optional property excludeIcons - an array of icon names using to exclude some category icons:
  1. ``` jsON
  2. {
  3.   "includeCategories": ["system"],
  4.   "excludeIcons": ["adjustments"]
  5. }
  6. ```

Complex solution:
  1. ``` jsON
  2. {
  3.   "includeIcons": ["alert-octagon", "alert-triangle"],
  4.   "includeCategories": ["devices", "system"],
  5.   "excludeIcons": ["adjustments"]
  6. }
  7. ```

Svelte


You can use [tabler-icons-svelte](https://github.com/benflap/tabler-icons-svelte) to use icons in your Svelte projects (see example):

  1. ``` js
  2. <script>
  3.     import { CurrencyBitcoin, BrandGithub, CircleX } from "tabler-icons-svelte";
  4. </script>
  5. <CurrencyBitcoin />
  6. <BrandGithub size="48" strokeWidth="1" />
  7. <CircleX />
  8. ```

Jetpack Compose


For Android or Desktop you can use [compose-icons](https://github.com/DevSrSouza/compose-icons) to use icons in your projects. (see docs)

Multiple strokes


All icons in this repository have been created with the value of the stroke-width property, so if you change the value, you can get different icon variants that will fit in well with your design.

Tabler Icons preview

License


Tabler Icons is licensed under the MIT License.