A package to provide popular icon packs for use with Django Cotton. Currently, Heroicons, Tabler Icons, Lucide Icons and Lucide Lab are supported.
Supported Icon Libraries
- Heroicons:
v2.2.0 - Tabler Icons:
v3.37.1 - Lucide Icons:
v1.57.0 - Lucide Lab:
v1.57.0
See the changelog for what changed in each release, including icon renames and removals.
Install
1. Install from pypi
pip install cotton-icons
2. Install into your django project
# settings.py
INSTALLED_APPS = [
'cotton_icons'
]
3. Use in template
| Library | Syntax | Variants | Default |
|---|---|---|---|
| Heroicons | <c-heroicon.icon-name /> |
outline, solid, mini, micro |
outline |
| Tabler | <c-tablericon.icon-name /> |
outline, filled |
outline |
| Lucide | <c-lucideicon.icon-name /> |
- | - |
| Lucide Lab | <c-lucidelab.icon-name /> |
- | - |
All attributes pass through to the <svg> tag. For stroke-based icons you can also pass stroke-width, stroke-linecap, and stroke-linejoin.
Icons are treated as decorative and render with aria-hidden="true" by default. If an icon carries meaning on its own, override it and give it a label:
<c-heroicon.magnifying-glass aria-hidden="false" aria-label="Search" />
Examples:
<c-heroicon.chevron-down class="size-5" />
<c-heroicon.chevron-down variant="solid" class="size-5" />
<c-heroicon.chevron-down variant="mini" class="size-5" />
<c-tablericon.graph class="size-5" />
<c-tablericon.graph variant="filled" class="size-5" />
<c-lucideicon.arrow-down class="size-5" />
<c-lucideicon.search class="size-5" stroke-width="3" />
<c-lucidelab.coconut class="size-5" />
Lucide's deprecated aliases are included, so an icon that was renamed upstream still works under its old name, for example <c-lucideicon.trash-2 /> renders trash. Aliases proxy to the real icon and may be dropped when Lucide removes them, so prefer the new name in new code. The alias list is in each set's icon_map.json.
Lucide Lab holds experimental icons that may be renamed, removed or promoted into the main set between releases. They live in their own namespace so that is visible where you use them and so a lab icon can never shadow a main one.
Metadata
Release files for cotton-icons 0.3.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 |
|---|---|---|---|---|
| cotton_icons-0.3.0.tar.gz | 908.0 kB | Without provenance | Details for cotton_icons-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cotton_icons-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for cotton_icons-0.3.0-py3-none-any.whl |
Total release size: 5.5 MB
Release files / cotton_icons-0.3.0.tar.gz
| Download URL | cotton_icons-0.3.0.tar.gz |
|---|---|
| Size | 908.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14829d6b1fa167b1d493e67a3a5a6e558d972b5bb493cc163a3d962a6e1fe98d
|
|
BLAKE2b-256 checksum How to use checksums |
a965080ac857e2d5094b3f7d319767ff56c25d87fffab0386293ffa310999e2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.11.0 Linux/6.17.0-1022-azure
|
Release files / cotton_icons-0.3.0-py3-none-any.whl
| Download URL | cotton_icons-0.3.0-py3-none-any.whl |
|---|---|
| Size | 4.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3c2ec9fc3542ef34d5f765832c64acd44a20f9c37e62f40ebbf60d501ad899b
|
|
BLAKE2b-256 checksum How to use checksums |
d09057eca9122cf993392e81ba4bad12e5c005d671c0c0480126363c7dc05a6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.11.0 Linux/6.17.0-1022-azure
|
Security for cotton-icons 0.3.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.