# UI Components Quick Reference ## Most Common Patterns ### 📝 Form Field (Basic) ```html ``` ### 📝 Required Field with Error ```html ``` ### 📝 Read-Only Field ```html ``` ### 🃏 Stats Card ```html

Label

Value

``` ### 🃏 Info Card ```html

Title

Label

Value

``` ### 🔘 Primary Button ```html ``` ### 🔘 Button with Icon ```html ``` ### 🔘 Secondary Button ```html ``` ### 🏷️ Status Badge (Success) ```html Active ``` ### 🏷️ Status Badge (Warning) ```html Pending ``` ### 🏷️ Status Badge (Danger) ```html Inactive ``` ## Grid Layouts ### 2 Columns (Desktop) ```html
...
...
``` ### 4 Columns (Responsive) ```html
``` ## Color Classes ### Background Colors - Primary: `bg-purple-600` - Success: `bg-green-600` - Warning: `bg-orange-600` - Danger: `bg-red-600` - Info: `bg-blue-600` ### Text Colors - Primary: `text-purple-600` - Success: `text-green-600` - Warning: `text-orange-600` - Danger: `text-red-600` - Info: `text-blue-600` ### Icon Colors - Primary: `text-purple-500 bg-purple-100` - Success: `text-green-500 bg-green-100` - Warning: `text-orange-500 bg-orange-100` - Danger: `text-red-500 bg-red-100` - Info: `text-blue-500 bg-blue-100` ## Common Icons - `user-group` - Users/Teams - `badge-check` - Verified - `check-circle` - Success - `x-circle` - Error/Inactive - `clock` - Pending - `calendar` - Dates - `refresh` - Update - `edit` - Edit - `delete` - Delete - `plus` - Add - `arrow-left` - Back - `exclamation` - Warning ## Spacing - Small gap: `gap-3` - Medium gap: `gap-6` - Large gap: `gap-8` - Margin bottom: `mb-4`, `mb-6`, `mb-8` - Padding: `p-3`, `p-4`, `px-4 py-3` ## Quick Copy-Paste: Page Structure ```html {# app/templates/admin/your-page.html #} {% extends "admin/base.html" %} {% block title %}Your Page{% endblock %} {% block alpine_data %}yourPageData(){% endblock %} {% block content %}

Page Title

Loading...

{% endblock %} ``` ## Remember 1. Always use `dark:` variants for dark mode 2. Add `:disabled="saving"` to buttons during operations 3. Use `x-show` for conditional display 4. Use `x-text` for dynamic text 5. Use `x-html="$icon(...)"` for icons 6. Validation errors: `border-red-600` class 7. Helper text: `text-xs text-gray-600` 8. Error text: `text-xs text-red-600` ## Reference Page Visit `/admin/components` for full component library with live examples!