# 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
```
## Number Stepper
A number input with +/- buttons for quantity selection. Ideal for cart quantities, batch sizes, and product pages.
### Basic Number Stepper
```html
{% from 'shared/macros/inputs.html' import number_stepper %}
{# Basic usage - cart quantity #}
{{ number_stepper(model='quantity', min=1, max=99) }}
```
### Size Variants
```html
{# Small - compact for tables/lists #}
{{ number_stepper(model='item.qty', min=1, max='item.stock', size='sm') }}
{# Medium (default) #}
{{ number_stepper(model='quantity', min=1, max=99) }}
{# Large - prominent placement #}
{{ number_stepper(model='batchSize', min=100, max=5000, step=100, size='lg') }}
```
### With Disabled State
```html
{{ number_stepper(model='qty', min=1, disabled_var='isLoading') }}
```
### Number Stepper Parameters
| Parameter | Default | Description |
|-----------|---------|-------------|
| `model` | required | Alpine.js x-model variable |
| `min` | `1` | Minimum allowed value |
| `max` | `none` | Maximum allowed value (can be Alpine.js expression) |
| `step` | `1` | Increment/decrement step |
| `size` | `'md'` | Size variant: `'sm'`, `'md'`, `'lg'` |
| `disabled_var` | `none` | Alpine.js variable for disabled state |
| `name` | `none` | Input name for form submission |
| `id` | `none` | Input id attribute |
| `label` | `'Quantity'` | Accessible label for screen readers |
---
## Tabs
Tab navigation components for switching between content sections.
### 🗂️ Navigation Tabs (with icons)
```html
{% from 'shared/macros/tabs.html' import tabs_nav, tab_button %}
{% call tabs_nav() %}
{{ tab_button('dashboard', 'Dashboard', icon='home') }}
{{ tab_button('settings', 'Settings', icon='cog') }}
{{ tab_button('profile', 'Profile', icon='user') }}
{% endcall %}