diff --git a/docs/development/icons_guide.md b/docs/development/icons_guide.md new file mode 100644 index 00000000..43936b61 --- /dev/null +++ b/docs/development/icons_guide.md @@ -0,0 +1,424 @@ +# Icon System Guide + +## Overview + +This project uses **Heroicons** (inline SVG) with a custom helper system for clean, maintainable icon usage across the multi-tenant ecommerce platform. + +### Why This Approach? + +- **No External Dependencies**: All icons are inline SVG - no CDN required +- **Performance**: Zero extra HTTP requests +- **Tailwind Integration**: Icons work seamlessly with Tailwind utility classes +- **Clean HTML**: No verbose SVG code cluttering your templates +- **Type Safety**: All available icons are defined in one place + +--- + +## Quick Start + +### 1. Include the Icon Helper + +Add this script **before** Alpine.js in your HTML pages: + +```html + + + + + +``` + +### 2. Use Icons with Alpine Magic Helper + +```html + + + + + + + + +``` + +--- + +## Available Icons + +### Navigation Icons +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `home` | `$icon('home')` | Dashboard, homepage | +| `menu` | `$icon('menu')` | Mobile menu toggle | +| `search` | `$icon('search')` | Search functionality | +| `arrow-left` | `$icon('arrow-left')` | Back navigation | +| `chevron-down` | `$icon('chevron-down')` | Dropdowns | +| `chevron-right` | `$icon('chevron-right')` | Next/forward | + +### User & Profile Icons +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `user` | `$icon('user')` | Single user profile | +| `users` | `$icon('users')` | Multiple users, team | +| `user-circle` | `$icon('user-circle')` | User avatar | +| `user-group` | `$icon('user-group')` | Groups, teams | +| `identification` | `$icon('identification')` | ID, credentials | +| `badge-check` | `$icon('badge-check')` | Verified badge | + +### Action Icons +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `edit` | `$icon('edit')` | Edit action | +| `delete` | `$icon('delete')` | Delete action | +| `plus` | `$icon('plus')` | Add/create action | +| `check` | `$icon('check')` | Success, confirmed | +| `close` | `$icon('close')` | Close, dismiss | +| `refresh` | `$icon('refresh')` | Reload, refresh | +| `duplicate` | `$icon('duplicate')` | Copy, duplicate | +| `eye` | `$icon('eye')` | View, show | +| `eye-off` | `$icon('eye-off')` | Hide | +| `filter` | `$icon('filter')` | Filter options | +| `dots-vertical` | `$icon('dots-vertical')` | More options (vertical) | +| `dots-horizontal` | `$icon('dots-horizontal')` | More options (horizontal) | + +### E-commerce Icons +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `shopping-bag` | `$icon('shopping-bag')` | Vendors, products | +| `shopping-cart` | `$icon('shopping-cart')` | Cart | +| `credit-card` | `$icon('credit-card')` | Payment | +| `currency-dollar` | `$icon('currency-dollar')` | Money, pricing | +| `gift` | `$icon('gift')` | Promotions, gifts | +| `tag` | `$icon('tag')` | Tags, categories | +| `truck` | `$icon('truck')` | Shipping, delivery | +| `receipt` | `$icon('receipt')` | Orders, receipts | + +### Inventory & Product Icons +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `cube` | `$icon('cube')` | Products, packages | +| `collection` | `$icon('collection')` | Collections, catalog | +| `photograph` | `$icon('photograph')` | Images, media | +| `color-swatch` | `$icon('color-swatch')` | Variants, colors | +| `template` | `$icon('template')` | Templates, layouts | +| `clipboard-list` | `$icon('clipboard-list')` | Lists, inventory | + +### Analytics & Reports +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `chart` | `$icon('chart')` | Analytics, stats | +| `trending-up` | `$icon('trending-up')` | Growth, increase | +| `trending-down` | `$icon('trending-down')` | Decline, decrease | +| `presentation-chart-line` | `$icon('presentation-chart-line')` | Reports, presentations | +| `calculator` | `$icon('calculator')` | Calculations, math | + +### Communication Icons +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `bell` | `$icon('bell')` | Notifications | +| `mail` | `$icon('mail')` | Email, messages | +| `chat` | `$icon('chat')` | Chat, messaging | +| `annotation` | `$icon('annotation')` | Comments, notes | +| `phone` | `$icon('phone')` | Phone, call | + +### System & Settings +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `cog` | `$icon('cog')` | Settings, configuration | +| `sun` | `$icon('sun')` | Light theme | +| `moon` | `$icon('moon')` | Dark theme | +| `database` | `$icon('database')` | Database, storage | +| `server` | `$icon('server')` | Server, hosting | +| `shield-check` | `$icon('shield-check')` | Security, verified | +| `key` | `$icon('key')` | API keys, passwords | +| `lock-closed` | `$icon('lock-closed')` | Locked, secure | +| `lock-open` | `$icon('lock-open')` | Unlocked | + +### Document & File Icons +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `document` | `$icon('document')` | Documents, files | +| `folder` | `$icon('folder')` | Folders, directories | +| `folder-open` | `$icon('folder-open')` | Open folder | +| `download` | `$icon('download')` | Download action | +| `upload` | `$icon('upload')` | Upload action | + +### Time & Calendar +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `calendar` | `$icon('calendar')` | Calendar, dates | +| `clock` | `$icon('clock')` | Time, schedule | + +### Location Icons +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `location-marker` | `$icon('location-marker')` | Location, address | +| `globe` | `$icon('globe')` | International, language | + +### Status & Indicators +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `exclamation` | `$icon('exclamation')` | Warning, alert | +| `information-circle` | `$icon('information-circle')` | Information, help | +| `spinner` | `$icon('spinner')` | Loading state | +| `star` | `$icon('star')` | Favorites, ratings | +| `heart` | `$icon('heart')` | Likes, favorites | +| `flag` | `$icon('flag')` | Reports, flags | + +### Links & External +| Icon Name | Usage | Description | +|-----------|-------|-------------| +| `external-link` | `$icon('external-link')` | Open in new tab | +| `link` | `$icon('link')` | URL, hyperlink | +| `logout` | `$icon('logout')` | Sign out | + +--- + +## Common Usage Patterns + +### Buttons with Icons + +```html + + + + + + + + +``` + +### Status Indicators + +```html + +
Total Sales
+$12,345
+