Skip to content

Icon components for popular packs (starting with Heroicons)

Notifications You must be signed in to change notification settings

wrabit/cotton-icons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A package to provide popular icon packs for use with Django Cotton. For now, Heroicons is supported.

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

<c-heroicon.[kebab-case heroicon name] variant="outline|solid|mini" [any other attribute will pass to the <svg> tag] />

  • variant defaults to outline
  • for outline variant, you can also pass stroke-width="" stroke_linecap="" stroke_linejoin=""

Examples:

<c-heroicon.chevron-down class="size-5" /> <!-- default variant "outline" -->
<c-heroicon.chevron-down variant="solid" class="size-5" />
<c-heroicon.chevron-down variant="mini" class="size-5" />

Roadmap

  • Add Tabler.io icons

About

Icon components for popular packs (starting with Heroicons)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published