{# app/templates/admin/components.html #} {% extends "admin/base.html" %} {% block title %}UI Components{% endblock %} {# ✅ CRITICAL: Link to Alpine.js component #} {% block alpine_data %}adminComponents(){% endblock %} {% block extra_head %} {# Chart.js for charts section #} {% endblock %} {% block content %}

UI Components Library

Back to Dashboard

Quick Reference Library

Copy-paste ready UI components for your admin pages. All components support dark mode and are fully accessible.

Sections

Pro Tip

Click any code block to copy it to your clipboard!

Forms

Basic Input

Required Field with Error

Textarea

Select

Buttons

Primary Button

Secondary Button

Danger Button

Cards

Basic Card

Card Title

This is a basic card component with a title and description.

Badges

Status Badges

Active Pending Inactive Info

Tables

Basic Table

Name Email Status
John Doe john@example.com Active
Jane Smith jane@example.com Pending

Modals

Confirmation Modal

Confirm Action

Are you sure you want to perform this action? This cannot be undone.

Alerts

Toast Notifications

Charts

Charts are provided by Chart.js . Note that default legends are disabled and you should provide descriptions for your charts in HTML.

Doughnut/Pie Chart

Shoes
Shirts
Bags

Line Chart

Organic
Paid

Bar Chart

Shoes
Bags
{% endblock %} {% block extra_scripts %} {# ✅ CRITICAL: Load JavaScript file #} {% endblock %}