# Component Library Documentation
## Overview
This document provides usage examples for all the enhanced UI components created for the EAMCO frontend.
---
## Components
### 1. StatCard
Animated statistics card with trend indicators.
**Props:**
- `label` (string, required) - Card label
- `value` (number | string, required) - Value to display
- `color` (string) - Color variant (primary, secondary, accent, info, success, warning, error)
- `trend` (string) - Trend text
- `trendDirection` (string) - up, down, or neutral
- `animate` (boolean) - Enable number counting animation
- `wrapperClass` (string) - Additional CSS classes
**Usage:**
```vue
```
---
### 2. FloatingInput
Modern input with floating label animation.
**Props:**
- `id` (string, required) - Input ID
- `label` (string, required) - Label text
- `modelValue` (string | number, required) - v-model value
- `type` (string) - Input type (default: 'text')
- `error` (string) - Error message
- `hint` (string) - Hint text
- `disabled` (boolean) - Disabled state
- `required` (boolean) - Required field
**Usage:**
```vue
```
---
### 3. EnhancedTable
Feature-rich table with sticky headers and zebra striping.
**Props:**
- `columns` (Column[], required) - Column definitions
- `data` (any[], required) - Table data
- `title` (string) - Table title
- `description` (string) - Table description
- `stickyHeader` (boolean) - Enable sticky header
- `zebra` (boolean) - Enable zebra striping
- `rowKey` (string) - Unique row key (default: 'id')
**Usage:**
```vue
{{ value }}
```
---
### 4. EnhancedButton
Button with loading states, success animations, and ripple effects.
**Props:**
- `variant` (string) - primary, secondary, accent, success, warning, error, ghost, outline
- `size` (string) - xs, sm, md, lg
- `type` (string) - button, submit, reset
- `disabled` (boolean) - Disabled state
- `loading` (boolean) - Loading state
- `success` (boolean) - Success state
- `icon` (Component) - Icon component
- `fullWidth` (boolean) - Full width button
**Usage:**
```vue
Save Changes
```
---
### 5. EnhancedBadge
Badge component with variants, pulse animations, and icons.
**Props:**
- `variant` (string) - primary, secondary, accent, info, success, warning, error, ghost
- `size` (string) - xs, sm, md, lg
- `outline` (boolean) - Outline style
- `dot` (boolean) - Show status dot
- `pulse` (boolean) - Pulse animation
- `icon` (Component) - Icon component
**Usage:**
```vue
Active
Pending
```
---
### 6. EnhancedModal
Modal dialog with backdrop blur and smooth animations.
**Props:**
- `modelValue` (boolean, required) - v-model for open/close state
- `title` (string) - Modal title
- `description` (string) - Modal description
- `size` (string) - sm, md, lg, xl, full
- `hideHeader` (boolean) - Hide header
- `hideClose` (boolean) - Hide close button
- `closeOnOverlay` (boolean) - Close on overlay click
- `noPadding` (boolean) - Remove body padding
**Usage:**
```vue
Cancel
Save
```
---
### 7. PageTransition
Wrapper component for page transitions.
**Props:**
- `name` (string) - fade, slide-left, slide-right, slide-up, slide-down, scale, rotate
**Usage:**
```vue
```
---
### 8. LoadingCard
Skeleton loader for cards.
**Usage:**
```vue
```
---
### 9. EmptyState
Empty state component with icon and action button.
**Props:**
- `title` (string, required) - Title text
- `description` (string, required) - Description text
- `actionLabel` (string) - Action button label
**Usage:**
```vue
```
---
## Design Tokens
### Shadow Utilities
- `.shadow-soft` - Subtle elevation
- `.shadow-medium` - Standard elevation
- `.shadow-strong` - Strong elevation
### Hover Effects
- `.hover-lift` - Lift on hover with shadow
### Animations
- `animate-fade-in` - Fade in animation
- `animate-slide-up` - Slide up animation
- `animate-slide-down` - Slide down animation
- `animate-scale-in` - Scale in animation
---
## Best Practices
1. **Consistency**: Use the same component variants throughout the app
2. **Accessibility**: Always provide labels and ARIA attributes
3. **Performance**: Use loading states to indicate async operations
4. **Feedback**: Show success/error states after user actions
5. **Responsiveness**: Test components on all screen sizes