Icon
Renders one of the Tabler Icons as <i class="ti ti-{name}">. It needs the
@tabler/icons-webfont stylesheet, see Installation.
<twig:Tabler:Icon name="server" /><twig:Tabler:Icon name="users" /><twig:Tabler:Icon name="file-invoice" /><twig:Tabler:Icon name="settings" /><i class="ti ti-server"></i><i class="ti ti-users"></i><i class="ti ti-file-invoice"></i><i class="ti ti-settings"></i>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:
<twig:Tabler:Icon name="server" size="sm" /><twig:Tabler:Icon name="server" /><twig:Tabler:Icon name="server" size="md" /><twig:Tabler:Icon name="server" size="lg" /><p class="mt-3 mb-0"> <twig:Tabler:Icon name="clock" size="inline" /> Updated 5 minutes ago</p><i class="ti icon icon-sm ti-server"></i><i class="ti ti-server"></i><i class="ti icon icon-md ti-server"></i><i class="ti icon icon-lg ti-server"></i><p class="mt-3 mb-0"> <i class="ti icon icon-inline ti-clock"></i> Updated 5 minutes ago</p>Filled
Section titled “Filled”filled renders the filled variant of the icon (ti-filled ti-filled-{name}):
<div class="d-flex align-items-center gap-3 fs-1"> <twig:Tabler:Icon name="star" variant="warning" /> <twig:Tabler:Icon name="star" variant="warning" filled /> <twig:Tabler:Icon name="heart" variant="danger" /> <twig:Tabler:Icon name="heart" variant="danger" filled /> <twig:Tabler:Icon name="bell" /> <twig:Tabler:Icon name="bell" filled /></div><div class="d-flex align-items-center gap-3 fs-1"> <i class="ti text-warning ti-star"></i> <i class="ti-filled text-warning ti-filled-star"></i> <i class="ti text-danger ti-heart"></i> <i class="ti-filled text-danger ti-filled-heart"></i> <i class="ti ti-bell"></i> <i class="ti-filled ti-filled-bell"></i></div>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):
@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.
Icons from symfony/ux-icons
Section titled “Icons from symfony/ux-icons”With Symfony UX Icons (2.17+ / 3.x) installed, a name with
an icon set prefix renders that icon as an inline <svg> instead of the webfont: any of the 200,000+ icons of
Iconify (lucide:circle-check, mdi:account, tabler:check…), or your own SVG
files in assets/icons/. Names without a prefix keep using the webfont, so both can be mixed.
composer require symfony/ux-iconsThe <svg> gets Tabler’s icon class, which sizes SVG icons, and the same variant, size and animation classes.
filled picks the filled icon of the tabler set (tabler:{name}-filled) and has no effect on other sets. Every
icon prop takes these names too, since the components render it with Icon:
<div class="d-flex align-items-center gap-3"> <twig:Tabler:Icon name="tabler:check" variant="success" /> <twig:Tabler:Icon name="tabler:star" variant="warning" /> <twig:Tabler:Icon name="tabler:star" variant="warning" filled /> <twig:Tabler:Icon name="lucide:circle-check" variant="success" size="md" /></div><twig:Tabler:Alert variant="success" icon="lucide:circle-check" title="Saved!" description="Your changes are live." class="mt-3 mb-0" /><div class="d-flex align-items-center gap-3"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="icon text-success" aria-hidden="true" > <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m5 12l5 5L20 7" ></path> </svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="icon text-warning" aria-hidden="true" > <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m12 17.75l-6.172 3.245l1.179-6.873l-5-4.867l6.9-1l3.086-6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z" ></path> </svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="icon text-warning" aria-hidden="true" > <path fill="currentColor" d="m8.243 7.34l-6.38.925l-.113.023a1 1 0 0 0-.44 1.684l4.622 4.499l-1.09 6.355l-.013.11a1 1 0 0 0 1.464.944l5.706-3l5.693 3l.1.046a1 1 0 0 0 1.352-1.1l-1.091-6.355l4.624-4.5l.078-.085a1 1 0 0 0-.633-1.62l-6.38-.926l-2.852-5.78a1 1 0 0 0-1.794 0z" ></path> </svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="icon text-success icon-md" aria-hidden="true" > <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> <circle cx="12" cy="12" r="10"></circle> <path d="m9 12l2 2l4-4"></path> </g> </svg></div><div class="alert alert-success mt-3 mb-0" role="alert"> <div class="alert-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="icon" aria-hidden="true"> <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> <circle cx="12" cy="12" r="10"></circle> <path d="m9 12l2 2l4-4"></path> </g> </svg> </div> <div> <h4 class="alert-heading">Saved!</h4> <div class="alert-description">Your changes are live.</div> </div></div>UX Icons hides the icon from assistive technology (aria-hidden="true") unless you give it an aria-label or a
title. Download the icons you use with php bin/console ux:icons:lock, so production never calls the Iconify API:
see the UX Icons documentation.
Variants
Section titled “Variants”variant sets the color (text-{variant}):
{% for variant in ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'] %} <twig:Tabler:Icon name="circle-check" variant="{{ variant }}" class="fs-1" />{% endfor %}<i class="ti text-primary ti-circle-check fs-1"></i><i class="ti text-secondary ti-circle-check fs-1"></i><i class="ti text-success ti-circle-check fs-1"></i><i class="ti text-danger ti-circle-check fs-1"></i><i class="ti text-warning ti-circle-check fs-1"></i><i class="ti text-info ti-circle-check fs-1"></i><i class="ti text-dark ti-circle-check fs-1"></i><i class="ti text-light ti-circle-check fs-1"></i>Animations
Section titled “Animations”animation is pulse, tada or rotate:
<twig:Tabler:Icon name="heart" variant="danger" animation="pulse" /><twig:Tabler:Icon name="bell" variant="warning" animation="tada" /><twig:Tabler:Icon name="refresh" variant="primary" animation="rotate" /><i class="ti text-danger icon-pulse ti-heart"></i><i class="ti text-warning icon-tada ti-bell"></i><i class="ti text-primary icon-rotate ti-refresh"></i>Attributes
Section titled “Attributes”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:
<div class="d-flex align-items-center gap-3"> <twig:Tabler:Button variant="primary"> <twig:Tabler:Icon name="plus" class="me-1" /> New invoice </twig:Tabler:Button> <twig:Tabler:Icon name="alert-triangle" variant="warning" class="fs-1" role="img" aria-label="Warning" /></div><div class="d-flex align-items-center gap-3"> <button type="button" class="btn btn-primary"> <i class="ti ti-plus me-1"></i> New invoice </button> <i class="ti text-warning ti-alert-triangle fs-1" role="img" aria-label="Warning"></i></div>Tooltip
Section titled “Tooltip”tooltip sets the title and data-bs-toggle="tooltip" on the <i> (or the UX Icons <svg>) itself, with no
wrapper, so the icon fits in an input group addon or next to a label. An icon with a tooltip carries meaning: it also
gets role="img" and the text as its aria-label, so screen readers announce it. Attributes you pass yourself win:
an aria-label with more context, or aria-hidden="true" when the text next to the icon already says the same, which
keeps the icon decorative (no role nor aria-label):
<div class="d-flex align-items-center gap-3"> <span>Last sync 14:00 <twig:Tabler:Icon name="info-circle" class="text-secondary" tooltip="Synced every hour" /></span> <twig:Tabler:Icon name="alert-triangle" variant="warning" tooltip="2 rows were skipped" /></div><div class="input-group mt-3"> <input type="text" class="form-control" placeholder="API key" aria-label="API key"> <span class="input-group-text"><twig:Tabler:Icon name="help" tooltip="Found in Settings, API" /></span></div><div class="d-flex align-items-center gap-3"> <span> Last sync 14:00 <i class="ti ti-info-circle text-secondary" data-bs-toggle="tooltip" title="Synced every hour" role="img" aria-label="Synced every hour" ></i> </span> <i class="ti text-warning ti-alert-triangle" data-bs-toggle="tooltip" title="2 rows were skipped" role="img" aria-label="2 rows were skipped" ></i></div><div class="input-group mt-3"> <input type="text" class="form-control" placeholder="API key" aria-label="API key" /> <span class="input-group-text"> <i class="ti ti-help" data-bs-toggle="tooltip" title="Found in Settings, API" role="img" aria-label="Found in Settings, API" ></i> </span></div>| Prop | Type | Default | Description |
|---|---|---|---|
name |
string | (required) | Icon name, without the ti- prefix; or a ux-icons name, see UX Icons |
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; with UX Icons, tabler:{name}-filled in the tabler set only |
tooltip |
string? | null |
Tooltip text (title, data-bs-toggle="tooltip"), also the aria-label (role="img") unless aria-hidden is set |
