Skip to content

Icon

Renders one of the Tabler Icons as <i class="ti ti-{name}">. It needs the @tabler/icons-webfont stylesheet, see Installation.

name is the icon name without the ti- prefix, as listed on tabler.io/icons.

Without size, the icon follows the font size of its parent. size gives it a fixed size, with Tabler’s icon class: sm (1rem), md (2.5rem) or lg (3.5rem). inline is 1rem and aligned with the text around it:

filled renders the filled variant of the icon (ti-filled ti-filled-{name}):

The filled icons are a separate font of @tabler/icons-webfont (3.36.1+), and its tabler-icons-filled.css reuses the class names of the outline icons (ti, ti-{name}), so it cannot be loaded next to them. Compile its SCSS source under the ti-filled prefix instead, here with Webpack Encore’s Sass loader (or symfonycasts/sass-bundle with AssetMapper):

assets/styles/tabler-icons-filled.scss
@use '@tabler/icons-webfont/dist/tabler-icons-filled.scss' with (
$ti-prefix: 'ti-filled',
$ti-font-path: '~@tabler/icons-webfont/dist/fonts'
);

$ti-font-path points at the font files: adjust it to how your build resolves node_modules.

variant sets the color (text-{variant}):

animation is pulse, tada or rotate:

Without size and variant, the icon inherits the font size and color of its parent. Other attributes go to the <i>: a spacing class next to a label, a font-size class, or role="img" and an aria-label when the icon carries meaning on its own:

Prop Type Default Description
name string (required) Icon name, without the ti- prefix
variant string? null primary secondary success danger warning info dark light
animation string? null pulse tada rotate
size string? null sm md lg inline (icon icon-{size}); unset, follows the font size
filled bool false Filled variant: ti-filled ti-filled-{name}, see Filled