Installation
Components are included with the main package:Available Components
Button
Versatile buttons with variants, sizes, loading states, and HTMX support
Card
Content containers with headers, footers, and multiple styles
Badge
Status indicators, labels, and dot notifications
Alert
Info, success, warning, and error messages with dismiss support
Form
Inputs, selects, textareas, checkboxes, and form layouts
Table
Data tables with headers, rows, and styling options
List
Description lists and action lists for structured content
Avatar
User avatars with images, initials, and status indicators
Modal
Dialogs and drawers for overlay content
Resource Widgets
App SDK-ready cards, lists, previews, and media helpers built on top of the component primitives.
Usage Pattern
All components follow the same pattern:Validation
Components validate their inputs using Zod schemas. Invalid options render a styled error box instead of crashing:- Component name
- Invalid parameter
- Human-readable error message
HTMX Integration
Most components support HTMX attributes for dynamic interactions:get,post,put,delete- HTTP methodstarget- CSS selector for target elementswap- How to swap content (innerHTML,beforeend, etc.)trigger- Event that triggers the requestconfirm- Confirmation dialog text
Styling
Components use Tailwind CSS classes. You can add custom classes with theclassName option:
text-primary,bg-primary- Primary brand colortext-secondary,bg-secondary- Secondary colortext-success,bg-success- Success/positive statetext-warning,bg-warning- Warning statetext-danger,bg-danger- Error/danger statetext-text-primary- Primary text colortext-text-secondary- Secondary text colorborder-border- Border colorbg-surface- Surface background
Security
All user-provided content must be escaped to prevent XSS:The
escapeHtml function is also available as ctx.helpers.escapeHtml in template functions.
