Skip to main content

Use tabler icons with django templates

Project description

Django tabler icons

Use the tabler icon set in your Django project.

Installation

Install the package from PyPI:

python -m pip install django-tabler-icons

Add tabler_icons to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    'tabler_icons',
    ...
]

Download the icon set:

python manage.py download_icons

Icons will be downloaded to <user_home_directory>/.config/django-tabler-icons. You can override this by setting the TABLER_ICONS_DIR setting, in project settings.

Usage

To add an icon to your template, use the tabler_icon template tag:

{% load tabler_icons %}

{% tabler_icon '<icon_name>' %}

If you need to add classes to the icon, use the second argument:

{% tabler_icon '<icon_name>' '<class_name_1> <class_name_2>' %}

The icons come with some default classes which you can remove by passing no to the third argument (keep_default_classes)

{% tabler_icon '<icon_name>' '<class_name_1> <class_name_2>' 'no' %}

The default is to keep the default classes so you can omit the third argument if you want to keep them.

Relevant projects

Heroicons is a package for using heroicons in Django projects, which is also the inspiration for this package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_tabler_icons-0.3.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

django_tabler_icons-0.3.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file django_tabler_icons-0.3.0.tar.gz.

File metadata

  • Download URL: django_tabler_icons-0.3.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for django_tabler_icons-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6b233fcd65623830513274e47b4eb2cde44dbb4bce854d34d990a946e72e0a8f
MD5 1927b0e10f12e1624907850d64651e6b
BLAKE2b-256 a7b07ca5746ee268a7ad0093abdf7992e223130e294bc34deaecaad7ea886c52

See more details on using hashes here.

File details

Details for the file django_tabler_icons-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_tabler_icons-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1dd7c44e84429847c3fe30b4e0486474d6dedf3d85dea3eedc8fc7f43c6e3d3d
MD5 50500492371617498d9ca242ae8485cb
BLAKE2b-256 03f2f9aa8dfc5697eaf95e263998549830bf4b84e2b09b2a7237cdd51ab03902

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page