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.2.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for django_tabler_icons-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d30eaaf7c3ff4754791e2350d150a0f3d8ca25fb6cea7071e5bf91148242ef07
MD5 e4d1481af50e8cbc8fd055321e0befa9
BLAKE2b-256 8a877ebe38daa46c0d21000996a0ed27a6dd794f14c6cb41b6c0322b2a3e947a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_tabler_icons-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fe7c5d78d6891d8068c5d6b30267e3ef9242615d29b9f73a6cd95305f87dfb2
MD5 b7d43699b7db1208139bf6c5bc9f2e28
BLAKE2b-256 f85e38f3e97fa19a8c045b8629045c6b1ef0fead1a8928f134211f59f9260acb

See more details on using hashes here.

Supported by

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