# Cursor-Inspired UI Integration Guide
## 🎨 Overview
This guide explains how to integrate the new Cursor-inspired flat+modern design system into your crypto trading platform pages.
---
## 📦 New CSS Files Created
### Core Design System
1. **`/static/shared/css/design-system-cursor.css`** (Required - Load First)
- Design tokens (colors, typography, spacing, shadows)
- Base reset and typography
- CSS variables for the entire system
- Inter font family loading
2. **`/static/shared/css/layout-cursor.css`** (Required)
- App container structure
- Sidebar navigation (240px, collapsible to 60px)
- Header (56px sleek design)
- Main content area
- Mobile responsive breakpoints
3. **`/static/shared/css/components-cursor.css`** (Required)
- Buttons (primary, secondary, ghost, danger, success)
- Cards (with hover lift effect)
- Forms (inputs, selects, textareas)
- Tables (clean, minimal borders)
- Badges, pills, alerts
- Modals, tooltips, dropdowns
- Skeleton loaders, progress bars
4. **`/static/shared/css/animations-cursor.css`** (Optional but Recommended)
- Keyframe animations (fade, slide, scale)
- Hover effects (lift, scale, glow)
- Loading states (spinners, dots)
- Page transitions
- Scroll reveal animations
- Utility animation classes
---
## 🚀 Quick Start - Update Your Pages
### Step 1: Update HTML `
` Section
Replace your existing CSS imports with the new Cursor design system:
```html
Your Page Title - Crypto Monitor
```
### Step 2: Update HTML Structure
Use the new layout structure:
```html
```
---
## 📱 Mobile Responsive
The design system is mobile-first and responsive:
### Breakpoints
- **Mobile**: < 768px
- **Tablet**: 768px - 1024px
- **Desktop**: > 1024px
### Automatic Responsive Behavior
- **Sidebar**: Slides in as overlay on mobile (<1024px)
- **Header Search**: Hidden on mobile (<1024px)
- **Cards**: Full-width with reduced padding on mobile
- **Tables**: Horizontal scroll on mobile
### Mobile-Specific Classes
```html
Card 1
Card 2
Card 3
```
---
## ✅ Migration Checklist
When updating an existing page:
- [ ] Replace CSS imports with new Cursor design system files
- [ ] Update `` tag: Add `data-theme="dark"` attribute
- [ ] Wrap content in `.app-container` → `.main-content` → `.page-content`
- [ ] Replace old button classes with `.btn .btn-primary` etc.
- [ ] Replace old card classes with `.card`
- [ ] Update form inputs to use `.input`, `.select`, `.textarea`
- [ ] Replace old table wrappers with `.table-container .table`
- [ ] Add animation classes where appropriate
- [ ] Test mobile responsiveness (< 768px)
- [ ] Verify sidebar collapse/expand works
- [ ] Check theme toggle functionality
---
## 🎯 Best Practices
1. **Always load CSS in order:**
```
design-system-cursor.css → layout-cursor.css → components-cursor.css → animations-cursor.css
```
2. **Use CSS variables for consistency:**
```css
/* Good */
padding: var(--space-4);
color: var(--text-secondary);
/* Avoid */
padding: 16px;
color: #A0A0A0;
```
3. **Use animation classes instead of custom CSS:**
```html
```
4. **Follow the 200ms animation standard:**
- All transitions should use `--duration-normal: 200ms`
- This matches Cursor's snappy feel
5. **Maintain dark theme by default:**
- Use `data-theme="dark"` on ``
- Support light theme with theme toggle
---
## 🔧 Customization
To customize the design system, override CSS variables in your page-specific CSS:
```css
/* your-page.css */
:root {
/* Change primary accent from purple to blue */
--accent-purple: #3B82F6;
--accent-purple-gradient: linear-gradient(135deg, #3B82F6, #1E40AF);
/* Adjust spacing */
--space-6: 32px; /* Increase card padding */
/* Custom durations */
--duration-normal: 250ms; /* Slightly slower */
}
```
---
## 📞 Support
For issues or questions:
1. Check the design system CSS files for available classes
2. Review this integration guide
3. Test in both desktop and mobile viewports
4. Verify all CSS files are loaded in correct order
---
## 🚀 Quick Links
- [Design System CSS](./shared/css/design-system-cursor.css)
- [Layout CSS](./shared/css/layout-cursor.css)
- [Components CSS](./shared/css/components-cursor.css)
- [Animations CSS](./shared/css/animations-cursor.css)
- [Header Layout](./shared/layouts/header.html)
- [Sidebar Layout](./shared/layouts/sidebar.html)
---
**Last Updated:** 2025-12-10
**Version:** 1.0.0
**Design System:** Cursor-Inspired Flat + Modern