Skip to main content

djc-phosphor-icons

Phosphor Icons as django-components.

Browse all icons →

Installation

pip install djc-phosphor-icons

Add to INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    "django_components",
    "djc_phosphor_icons",
]

Usage

{% component "Icon" name="house" / %}
{% component "Icon" name="house" weight="bold" / %}
{% component "Icon" name="house" style="stroke" size=24 color="#ff0000" / %}
Kwarg Type Default Description
name str Icon name, e.g. "house"
weight str "regular" bold, duotone, fill, light, regular, thin
style str "flat" flat or stroke
size int None Sets width and height in px
color str None Sets CSS color
mirrored bool False Flips the icon horizontally
attrs dict None Extra attributes passed to the <svg> element

Settings

Configure via PHOSPHOR_ICONS in your Django settings:

PHOSPHOR_ICONS = {
    "auto_register": True,        # Auto-register the component on startup (default: True)
    "component_name": "Icon",     # Template tag name (default: "Icon")
    "default_style": "flat",      # Default style (default: "flat")
    "default_weight": "regular",   # Default weight (default: "regular")
    "cache": True,                # Cache rendered output per unique set of kwargs (default: True)
}

Development

uv sync
uv run pytest
uv run ruff check .
uv run ruff format .

To update the icon set to a specific Phosphor release (for local inspection only — the update-icons GitHub Action handles this automatically when committing):

uv run python scripts/download_icons.py v2.1.0

To generate a visual preview of all icons:

uv run python scripts/preview_icons.py

Known Icon Issues

The following icons are incomplete in the upstream Phosphor release and will fail to render in certain combinations:

  • book-user: missing from stroke/light, stroke/bold, stroke/fill, stroke/duotone

Download files

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

Source Distribution

djc_phosphor_icons-0.1.0.tar.gz (3.7 MB view details)

Uploaded Source

Built Distribution

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

djc_phosphor_icons-0.1.0-py3-none-any.whl (9.1 MB view details)

Uploaded Python 3

File details

Details for the file djc_phosphor_icons-0.1.0.tar.gz.

File metadata

  • Download URL: djc_phosphor_icons-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for djc_phosphor_icons-0.1.0.tar.gz
Algorithm Hash digest
SHA256 22c664203cfa49105079ce20040bf8b09352418fd33a0cd94a5e95cad037d5a6
MD5 c437a6d1c6cfeccf4548d8d1ee876b96
BLAKE2b-256 3334aacd3107323674792f6d5553bf737f0c8f84f0a6e56b2e7af2a4737983b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for djc_phosphor_icons-0.1.0.tar.gz:

Publisher: publish.yml on joeyjurjens/djc-phosphor-icons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file djc_phosphor_icons-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for djc_phosphor_icons-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bc9276fc44d3ce7e6c9d8a2fc301abbdd8eab796e8f0fefd2de31f9e3e4ed6a
MD5 0776a391c371de98f7459c60abe29625
BLAKE2b-256 d11e4e6df0a06c92a94b973a3ee7eeb90f2b0ad9d6f58d931eaf64f8cd075c6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for djc_phosphor_icons-0.1.0-py3-none-any.whl:

Publisher: publish.yml on joeyjurjens/djc-phosphor-icons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page