Metadata-Version: 2.3
Name: django-icons-bootstrap-icons
Version: 1.0.1
Summary: Bootstrap Icons renderer for django-icons
Project-URL: Repository, https://github.com/pyrox0/django-icons-bootstrap-icons
Project-URL: Issues, https://github.com/pyrox0/django-icons-bootstrap-icons/issues
Project-URL: Changelog, https://github.com/pyrox0/django-icons-bootstrap-icons/releases
Author-email: Pyrox/dish <pyrox@pyrox.dev>
Maintainer-email: Pyrox/dish <pyrox@pyrox.dev>
License-File: LICENSE
Keywords: bootstrap,bootstrap-icons,django,django-icons,icons
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: django-icons>=24.3
Description-Content-Type: text/markdown

# django-icons-bootstrap-icons

This project provides a renderer for [Bootstrap Icons](https://icons.getbootstrap.com) utilizing [django-icons](https://django-icons.readthedocs.io/en/latest/index.html).

## Installation

[PyPI](https://pypi.org/project/django-icons-bootstrap-icons/)

Just run:

```
pip install django-icons-bootstrap-icons
```

## To use

In your settings.py file:

```py

DJANGO_ICONS = {
  "DEFAULT": {
    "renderer": "django_icons_bootstrap_icons.BootstrapIconRenderer"
  }
}
```

Then just use the `{% icon %}` tag as normal!

## Extra features

This renderer includes a very neat feature over the default `IconRenderer`, which is support for custom attributes.

For instance, to add an aria-label to your icon, you can do the following:

`{% icon "person" aria_label="person icon" %}`

Note that while attributes in HTML are `-`, separated, this isn't possible in Django templates due to Python. Therefore, write the keys with `_` instead, and the renderer will autoconvert them for you.

This also works with attributes that do not have `-`es in them, such as `tabindex`.

Aside from this, `BootstrapIconRenderer` supports all features of the default renderer as it is just a superclass of `IconRenderer`.

## Contributing

I welcome all contributions! Just fork and then send a PR.

## License

This work is licensed under the MIT license.
