django-svg-sprite¶
A Django template tag for easy use of SVG sprites in templates.
Quick start¶
-
Add
django_svg_sprite
to yourINSTALLED_APPS
setting like this:INSTALLED_APPS = [ ..., 'django_svg_sprite', ]
-
Set the
SVG_SPRITE
setting to the SVG sprite file in your static files to be used, e.g.:SVG_SPRITE = 'bootstrap-icons.svg'
-
Use the tag in your template, e.g.:
{% load svg_sprite %} {% svg_sprite 'hand-thumbs-up' fill='yellow' class='bi' %}
See settings and template tags documentation for details.
License¶
This project is licensed under the MIT license.