Skip to main content

cotton-heroicons

A Django Cotton Component Library of Heroicons

Usage

To use the icons in your templates, simply add the component tag with the icon name as the tag name. The default variant is 'outline', but you can specify a different variant using the 'variant' attribute.

Any additional HTML attributes (e.g. class, id) are passed directly to the <svg> element.

Each variant has a default size that matches the Heroicons recommendations:

  • outline / solid: 1.5rem (24px)
  • mini: 1.25rem (20px)
  • micro: 1rem (16px)

You can override the default size by passing a style attribute.

<!-- The default variant is 'outline' -->
<c-heroicon.cloud />

<!-- Specify the variant with the 'variant' attribute -->
<c-heroicon.shopping-bag variant="mini" />

<!-- Add additional classes -->
<c-heroicon.square-3-stack-3d class="text-violet-700" />

<!-- Override the default size -->
<c-heroicon.eye style="width: 0.75rem; height: 0.75rem;" />

Outline variant options

The outline variant exposes stroke_width, stroke_linecap, and stroke_linejoin attributes:

<c-heroicon.cloud stroke_width="2" />

Installation

pip install cotton-heroicons

Update Django settings:

INSTALLED_APPS = [
    ...
    'django_cotton',
    'cotton_heroicons',
    ...
]

Release files for cotton-heroicons 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cotton-heroicons 0.2.0
File Size Uploaded
cotton_heroicons-0.2.0.tar.gz 153.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cotton-heroicons 0.2.0
File Interpreter ABI Platform
cotton_heroicons-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 541.1 kB

Release files / cotton_heroicons-0.2.0.tar.gz

Download URL cotton_heroicons-0.2.0.tar.gz
Size 153.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a220da6692dd717116c3907fbbff56e597f7116466d9e4671a3982abd8488201
BLAKE2b-256 checksum
How to use checksums
9e7f381cf4734b39a36f959dacabb9cadd17d608b59a8ae658d48d0deb3acd5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / cotton_heroicons-0.2.0-py3-none-any.whl

Download URL cotton_heroicons-0.2.0-py3-none-any.whl
Size 387.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b022b12dcb253f1c8274dc969f9655637e8ccd3b25d1c92d07a56f1b8d2c574b
BLAKE2b-256 checksum
How to use checksums
e0df34094402aaa8a7d4b60741a6b19f758ffd60077bb88718ef4bb454dbb5f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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