django-iconx
CSS-only icon system for Django.
Generates a single CSS file from SVG icon sources. No JavaScript, no icon fonts.
python manage.py iconx add lucide
<i class="icon icon-search"></i>
<span class="icon icon-check text-2xl text-green-500"></span>
Built-in support for Lucide, Heroicons, Tabler, Phosphor, Bootstrap Icons, and Remix. Or bring your own SVGs.
How it works and what the upsides are
Mono icons use mask-image with background-color: currentColor, so the SVG acts as a mask and the icon inherits text color. Multi-color icons use background-image to preserve original SVG colors.
The output is plain CSS classes: no runtime, no bundler plugin, no framework coupling. The approach is not Django-specific; Django is just a good fit because its static file conventions make wiring it up easy. Any stack that serves CSS and renders HTML can use the generated stylesheet directly.
.icon { display: inline-block; width: 1em; height: 1em; }
.icon-search, .icon-check { background-color: currentColor; mask-size: contain; mask-mode: alpha; }
.icon-search { mask-image: url("/static/icons/search.svg"); }
.icon-logo { background-image: url("/static/logos/logo.svg"); }
currentColor+mask-image: icons inherit text color1emsizing: icons scale with font size / Tailwindtext-*- Direct element styling, no
::beforepseudo-element - Tree-shakeable: PurgeCSS strips unused
.icon-*rules
Browser support
CSS mask-image is supported unprefixed in all modern browsers since Dec 2023 (~97% global coverage). Tailwind v4 handles vendor prefixing automatically:
@import "tailwindcss";
@import "./static/iconx/icons.css";
Quick start
uv add django-iconx
INSTALLED_APPS = ["django_iconx", ...]
STATICFILES_DIRS = [BASE_DIR / "static"]
python manage.py iconx add lucide
That downloads Lucide icons and generates the CSS. Include the CSS in your template or Tailwind entry point and use icons via class names. See the full documentation at oliverhaas.github.io/django-iconx for custom SVGs, multiple icon sets, and configuration options.
License
MIT
Metadata
Release files for django-iconx 0.2.0
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 |
|---|---|---|---|---|
| django_iconx-0.2.0.tar.gz | 11.2 kB | With provenance | Details for django_iconx-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_iconx-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for django_iconx-0.2.0-py3-none-any.whl |
Total release size: 25.2 kB
Release files / django_iconx-0.2.0.tar.gz
| Download URL | django_iconx-0.2.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91c0c44c0d501a4cf00ae093085b4611e8b92d98f002ce39986cf74a4d0b68af
|
|
BLAKE2b-256 checksum How to use checksums |
d2e18c0e96247274c59e9dc2575c0d6c9cb472ec5f30faa7c192b4aebba68c9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 12, 2026.
Transparency logRelease files / django_iconx-0.2.0-py3-none-any.whl
| Download URL | django_iconx-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72c39bf66925d30ce4710c84e7134fa2e63aa2bf76d3b130915de1b9e7a2e72e
|
|
BLAKE2b-256 checksum How to use checksums |
f062ef7b6cfdaabfdebf509e95998dcef5e33d98c0a58cd967846bc4cf1ff617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 12, 2026.
Transparency logSecurity for django-iconx 0.2.0
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 django_iconx-0.2.0.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 Apr 12, 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.