Skip to content

Overviewยค

django-components makes it easy to share components between projects (See how to package components).

Here you will find public examples of components and component libraries.

If you have components that would be useful to others, open a pull request to add them to this collection.

Scenariosยค

  • Form Submission - Handle the entire form submission flow in a single file and without Django's Form class.
  • HTML fragments - Load HTML fragments using different client-side techniques: vanilla JavaScript, AlpineJS, and HTMX.
  • Error handling - A component that catches errors and displays fallback content, similar to React's ErrorBoundary.
  • Recursion - 100 nested components? Not a problem! Handle recursive rendering out of the box.
  • A/B Testing - Dynamically render different component versions. Use for A/B testing, phased rollouts, etc.
  • Analytics - Track component errors or success rates to send them to Sentry or other services.

Componentsยค

Packagesยค

Packages or projects that define components for django-components: