tablericons
Use Tabler Icons in your Django and Jinja templates.
Requirements
Python from 3.10 supported.
Django from 5.2 supported.
Usage
The tablericons2 package supports both Django templates and Jinja templates.
Follow the appropriate guide below.
Django templates
-
Install with
python -m pip install tablericons2[django]. -
Add to your
INSTALLED_APPS:INSTALLED_APPS = [ ..., "tablericons", ..., ]
-
Now your templates can load the template library with:
{% load tablericons %}
Alternatively, make the library available in all templates by adding it to the builtins option:
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
# ...
"OPTIONS": {
# ...
"builtins": [
...,
"tablericons.templatetags.tablericons",
...,
],
},
}
]
The library provides one tag (icon) to render SVG icons which can take these arguments:
-
name, positional: the name of the icon to use. You can see the icon names on the tabler grid. -
size, keyword: an integer that will be used for the width and height attributes of the output<svg>tag. Defaults to the icons’ designed sizes,24. It can also beNone, in which case no width or height attributes will be output. -
Any number of keyword arguments. These will be added as attributes in the output HTML. Underscores in attribute names will be replaced with dashes, allowing you to define e.g.
data-attributes.
Most attributes will be added to the <svg> tag containing the icon, but these attributes will be attached to the inner <path> tags instead:
stroke-linecapstroke-linejoinvector-effect
Note: unlike the SVG code you can copy from tabler grid, there is no default
class.
Examples
An "arrow-down” icon:
{% icon "outline/arrow-down" %}
The same icon at 40x40 pixels, and a CSS class:
{% icon "outline/arrow-down" size=40 class="mr-4" %}
That icon again, but with the paths changed to a narrower stroke width, and a "data-controller" attribute declared:
{% icon "outline/arrow-down" stroke_width=1 data_controller="language" %}
Django Settings
New in 1.1.0
You can override the default size and stroke width using your settings.py:
TABLERICONS_SIZE = 24
TABLERICONS_STROKE_WIDTH = 2
Jinja templates
-
Install with
python -m pip install tablericons[jinja]. -
Adjust your Jinja
Environmentto add the globaltablericonsfunction fromtablericons.jinja. For example:from tablericons.jinja import tablericons from jinja2 import Environment env = Environment() env.globals.update({ "tablericons": tablericons } )
-
Now in your templates you can call that function, which will render the corresponding
<svg>icons. The function takes these arguments:
-
name, positional: the name of the icon to use. You can see the icon names on the tabler grid -
size, keyword: an integer that will be used for the width and height attributes of the output<svg>tag. Defaults to the icons’ designed sizes,24. Can beNone, in which case no width or height attributes will be output. -
Any number of keyword arguments. These will be added as HTML attributes to the output HTML. Underscores in attribute names will be replaced with dashes, allowing you to define e.g.
data-attributes.
Most attributes will be added to the <svg> tag containing the icon, but these attributes will be attached to the inner <path> tags instead:
stroke-linecapstroke-linejoinvector-effect
Note: unlike the SVG code you can copy from tabler grid, there is no default
class.
Examples
An "outline/arrow-down” icon:
{{ icon("outline/arrow-down") }}
The same icon at 40x40 pixels and a CSS class:
{{ icon("outline/arrow-down", size=40, class="mr-4") }}
That icon again, but with the paths changed to a narrower stroke width, and a "data-controller" attribute declared:
{{ icon("outline/arrow-down", stroke_width=1, data_controller="language") }}
Acknowledgements
This package is forked from franciscobmacedo/lucide which in turn is heavely inspired by Adam Johnson's heroicons.
Metadata
Release files for tablericons2 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tablericons2-1.1.1.tar.gz | 1.6 MB | With provenance | Details for tablericons2-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tablericons2-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for tablericons2-1.1.1-py3-none-any.whl |
Total release size: 3.3 MB
Release files / tablericons2-1.1.1.tar.gz
| Download URL | tablericons2-1.1.1.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd1ada2b44faa62b8a6e4e855b94a2961b177ed01f3cffc2e581cdef2e77d249
|
|
BLAKE2b-256 checksum How to use checksums |
344d13956f33e844914d9cdf64e5feeebe4d4918054b40aabe016da55b3ccaaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.
Transparency logRelease files / tablericons2-1.1.1-py3-none-any.whl
| Download URL | tablericons2-1.1.1-py3-none-any.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8563bca34438dccaa79d4b9b4dda500c239fd7f26e5d5fe617b77e4e69c2c3d4
|
|
BLAKE2b-256 checksum How to use checksums |
8ff848525b980476cb33c1e9b28935d567b896ad5f3f9e403450d72aee5a51ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.
Transparency logSecurity for tablericons2 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tablericons2-1.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.