Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/techtronixx/widget_showcase
A modern, customizable widget system built with React, TypeScript, Framer Motion, and Tailwind CSS.
https://github.com/techtronixx/widget_showcase
components ecommerce framer-motion shadcn-ui templates uikit widgets
Last synced: 28 days ago
JSON representation
A modern, customizable widget system built with React, TypeScript, Framer Motion, and Tailwind CSS.
- Host: GitHub
- URL: https://github.com/techtronixx/widget_showcase
- Owner: TechTronixx
- Created: 2025-01-23T11:37:01.000Z (28 days ago)
- Default Branch: main
- Last Pushed: 2025-01-23T12:02:54.000Z (28 days ago)
- Last Synced: 2025-01-23T12:27:27.315Z (28 days ago)
- Topics: components, ecommerce, framer-motion, shadcn-ui, templates, uikit, widgets
- Language: TypeScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# E-commerce Widget System Documentation
## Overview
A modern, customizable widget system built with React, TypeScript, Framer Motion, and Tailwind CSS. The system provides a collection of reusable, accessible, and highly customizable e-commerce components designed for scalability and performance.
## Widget Showcase
Your browser does not support the video tag.Watch our widget system in action! The video above demonstrates our comprehensive collection of e-commerce components including:
- Product Quick View with image gallery
- Dynamic Stock Status Indicators
- Animated Mini Cart Drawer
- Interactive Refer & Earn Widgets
- Order Status Timeline
- Back in Stock NotificationsEach component showcases smooth animations, responsive design, and theme customization capabilities.
## Core Features
- 🎨 Theme Support (Light/Dark)
- 🎯 Customizable Accent Colors
- 📱 Responsive Design
- ♿ Accessibility
- 🔄 Smooth Animations
- 🛡️ Type Safety
- 🎭 Multiple Variants## Widget Collection
### 1. Product Quick View
A modal-based product viewer with:
- Image gallery with navigation
- Product details (name, price, description)
- Rating display
- Size and color selection
- Add to cart and wishlist actions
- Responsive layout
- Smooth enter/exit animations```typescript
{}}
/>
```### 2. Stock Status Indicator
A versatile status display with three variants:
- Badge: Compact inline status
- Card: Detailed status with progress
- Inline: Simple text-based statusFeatures:
- Multiple states (in-stock, low-stock, out-of-stock, restocking)
- Quantity tracking
- Progress visualization
- Customizable thresholds```typescript
```
### 3. Mini Cart Drawer
A sliding cart drawer with:
- Animated entrance/exit
- Item quantity controls
- Remove item functionality
- Price breakdown
- Empty state handling
- Checkout button```typescript
{}}
onRemoveItem={(id) => {}}
shipping={5.99}
tax={2.99}
/>
```### 4. Refer & Earn Widgets
#### 4.1 Classic Form
A traditional referral form with:
- Email and name collection
- Form validation
- Success feedback
- Clean design```typescript
{}}
/>
```#### 4.2 Gamified Card
A progress-tracking referral widget with:
- Milestone system
- Progress visualization
- Rank display
- Total referrals counter
- Next milestone preview```typescript
```
#### 4.3 Minimal Design
A streamlined single-field referral form:
- Single input field
- Instant submission
- Minimalist design
- Floating action button```typescript
{}}
/>
```#### 4.4 Social Sharing
A social-focused referral widget with:
- Multi-platform sharing
- Copyable referral code
- Tabbed interface
- Share statistics```typescript
```
### 5. Order Status Widgets
#### 5.1 Classic Timeline
A detailed order tracking display:
- Vertical timeline
- Status icons
- Estimated delivery
- Order details```typescript
```
#### 5.2 Compact View
A space-efficient status display:
- Horizontal progress
- Minimal design
- Key information only
- Mobile-optimized```typescript
```
#### 5.3 Toast Notification
A non-intrusive status update:
- Auto-dismissing
- Progress indicator
- Status-specific icons
- Minimal footprint```typescript
{}}
/>
```### 6. Back in Stock Notification
A notification signup widget:
- Email collection
- Multiple notification options
- Success feedback
- Stock status display```typescript
{}}
/>
```## Implementation Details
### Animation Strategy
- Using Framer Motion for fluid animations
- AnimatePresence for mount/unmount animations
- Spring animations for natural movement
- Layout animations for smooth transitions### State Management
- Local state for UI interactions
- Props for data and callbacks
- Controlled components pattern### Styling Approach
- Tailwind CSS for utility-first styling
- Dynamic theme switching
- Consistent spacing and colors
- Responsive breakpoints### Type Safety
- TypeScript interfaces for props
- Strict null checks
- Exhaustive status handling
- Type guards where necessary## Best Practices
### Performance
- Code splitting for each widget
- Optimized animations
- Lazy loading of images
- Memoization of expensive calculations### Accessibility
- ARIA labels and roles
- Keyboard navigation
- Focus management
- Color contrast compliance### Customization
- Theme support (light/dark)
- Configurable colors
- Multiple variants
- Flexible props API## Common Interview Questions
1. **Why use Framer Motion over CSS animations?**
- Better control over animation states
- More complex animation sequences
- Built-in exit animations
- TypeScript support2. **How is theme switching implemented?**
- Theme prop passed to components
- Conditional classes with Tailwind
- Dynamic color variables
- Consistent theme interface3. **What makes the widgets reusable?**
- Flexible props API
- Consistent styling patterns
- Self-contained components
- Clear documentation4. **How is performance optimized?**
- Lazy loading
- Animation optimization
- Efficient re-renders
- Code splitting## Future Enhancements
1. **Integration Features**
- Analytics hooks
- A/B testing support
- Custom event system
- Third-party integrations2. **Additional Customization**
- More variants
- Custom animation options
- Extended theming
- Layout alternatives3. **Advanced Features**
- Offline support
- Multi-language
- RTL support
- Advanced analytics## Technical Requirements
```json
{
"dependencies": {
"react": "^18.0.0",
"framer-motion": "^10.0.0",
"tailwindcss": "^3.0.0",
"lucide-react": "^0.300.0",
"typescript": "^5.0.0"
}
}
```## Code Examples
### Theme Implementation
```typescript
interface ThemeProps {
theme?: "light" | "dark";
accentColor?: string;
}const getThemeClasses = (theme: "light" | "dark") => ({
background: theme === "light" ? "bg-white" : "bg-gray-900",
text: theme === "light" ? "text-gray-900" : "text-white",
border: theme === "light" ? "border-gray-200" : "border-gray-700",
});
```### Animation Pattern
```typescript
{isOpen && (
{content}
)}```
## Contributing Guidelines
1. Follow TypeScript best practices
2. Maintain consistent styling patterns
3. Include proper documentation
4. Add necessary tests
5. Ensure accessibility compliance