Django Bootstrap Icons screenshot

Django Bootstrap Icons

Author Avatar Theme by Christianwgd
Updated: 4 Dec 2025
27 Stars

A quick way to add Bootstrap Icons with Django template tags.

Categories

Overview:

django-bootstrap-icons is a quick and easy way to add Bootstrap Icons to Django templates. It provides template tags that allow users to easily embed and style Bootstrap SVG icons in their templates. The package can be installed from PyPI using pip, and it integrates well with both Bootstrap Icons and Material Design Icons. Users can also customize icons and specify the source from which the icons are loaded.

Features:

  • Easy Integration: Users can simply add the django_bootstrap_icons Django app to their settings file and load the tag library in their templates to start using Bootstrap Icons.
  • Icon Sizing: Icons can be easily sized by setting the size parameter.
  • Icon Styling: Icons can be styled by specifying the color parameter and adding extra CSS classes.
  • Vertical Alignment: Users have the option to align icons vertically using CSS classes provided by django-bootstrap-icons.
  • Custom Icons: Custom icons can be used by storing them in a static directory and setting the BS_ICONS_CUSTOM_PATH setting. Users can also download Bootstrap Icons from Bootstrap, store them in their static files, and use them with the custom_icon template tag.
  • Material Design Icons Compatibility: django-bootstrap-icons works well with Material Design Icons and provides a template tag for them. It adjusts the rendering of Material Design Icons to ensure they have the same size as Bootstrap Icons.
  • Configuration: Users can specify the source from which the icons are loaded by setting the BS_ICONS_BASE_URL setting.

Installation:

To install django-bootstrap-icons, follow these steps:

  1. Run the following command to install the package using pip:

    pip install django-bootstrap-icons
    
  2. Add the django_bootstrap_icons Django app to your settings file:

    INSTALLED_APPS = [
        ...
        'django_bootstrap_icons',
        ...
    ]
    
  3. Load the tag library in your template file:

    {% load bootstrap_icon_tags %}
    

Summary:

django-bootstrap-icons is a convenient package for integrating Bootstrap Icons into Django templates. It provides a simple and intuitive way to embed and style Bootstrap SVG icons. With features such as icon sizing, styling, and vertical alignment, as well as compatibility with custom icons and Material Design Icons, this package offers flexibility and customization options. Additionally, users can configure the source of the icons to be loaded. Overall, django-bootstrap-icons is a valuable tool for enhancing the visual appeal of Django templates with Bootstrap Icons.