Skip to main content

Django Components Bootstrap

Bootstrap 5 components for Django with React-Bootstrap API parity.

Installation

pip install django-components-bootstrap

Add to your Django settings:

INSTALLED_APPS = [
    ...
    "django_components",
    "django_components_bootstrap",
]

Quick Start

{% load component_tags %}

{% component "Button" variant="primary" %}
    Click me!
{% endcomponent %}

{% component "Alert" variant="success" dismissible=True %}
    <strong>Success!</strong> Your changes have been saved.
{% endcomponent %}

Configuration

By default, all Bootstrap components are automatically registered when the app loads. To disable auto-registration:

DJANGO_COMPONENTS_BOOTSTRAP = {
    "AUTO_REGISTER": False,
}

When auto-registration is disabled, you can manually import and register components:

from django_components import registry
from django_components_bootstrap.components.bootstrap5 import Button, Alert

registry.register("Button", Button)
registry.register("MyAlert", Alert)  # Register under a custom name

Documentation

Full documentation with examples: https://joeyjurjens.github.io/django-components-bootstrap/

Development

Setup

git clone https://github.com/joeyjurjens/django-components-bootstrap.git
cd django-components-bootstrap
uv sync --all-extras

Running Tests

pytest

Linting & Formatting

uv run ruff format .        # format code
uv run ruff check .         # lint
uv run ruff check --fix .   # lint, auto-fixing what it can

Building Documentation

cd docs
python generate_docs.py
mkdocs serve

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_components_bootstrap-0.2.0.tar.gz (110.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_components_bootstrap-0.2.0-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

Details for the file django_components_bootstrap-0.2.0.tar.gz.

File metadata

File hashes

Hashes for django_components_bootstrap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3b5ce223ef92677c2c535df43a4f8cedc5180b0055bc25c7ba0a9165f6e41da1
MD5 8b2fdd5c13dafbe540a41000048f7e1a
BLAKE2b-256 9562563f3eadce417a99c612fa9598f6083aacbb94f561348c694d394236b70f

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_components_bootstrap-0.2.0.tar.gz:

Publisher: publish.yml on joeyjurjens/django-components-bootstrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_components_bootstrap-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_components_bootstrap-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e281b282a10a7024f8194bd604442758f36759e8387f69ac61a635a968b1fa16
MD5 dd6c72536efc7e0c77e1119375137f8b
BLAKE2b-256 27fc957892e229220e8d1cc49db37c4e63edaddb496f49c860af26cf01de0b9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_components_bootstrap-0.2.0-py3-none-any.whl:

Publisher: publish.yml on joeyjurjens/django-components-bootstrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 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