README.md

February 23, 2026 ยท View on GitHub

A package to provide popular icon packs for use with Django Cotton. Currently, Heroicons, Tabler Icons, and Lucide Icons are supported.

Supported Icon Libraries

  • Heroicons: v2.2.0
  • Tabler Icons: v3.37.1
  • Lucide Icons: v0.575.0

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

LibrarySyntaxVariantsDefault
Heroicons<c-heroicon.icon-name />outline, solid, mini, microoutline
Tabler<c-tablericon.icon-name />outline, filledoutline
Lucide<c-lucideicon.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.

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" />

Roadmap