|
| 1 | +--- |
| 2 | +applyTo: 'src/**/*.{tsx,css}' |
| 3 | +--- |
| 4 | + |
| 5 | +# UI and Styling Instructions |
| 6 | + |
| 7 | +**IMPORTANT: This is a desktop-only application. Do not consider mobile devices, responsive design for mobile, or touch interfaces. Focus exclusively on desktop user experience with mouse and keyboard interactions.** |
| 8 | + |
| 9 | +## Design Philosophy |
| 10 | + |
| 11 | +### Core Principles |
| 12 | +- **Simplicity Through Reduction**: Identify the essential purpose and eliminate everything that distracts from it. |
| 13 | +- **Material Honesty**: Buttons should feel pressable, cards should feel substantial, animations should reflect real-world physics. |
| 14 | +- **Obsessive Detail**: Consider every pixel, every interaction, and every transition. |
| 15 | +- **Coherent Design Language**: Every element should visually communicate its function and feel like part of a unified system. |
| 16 | +- **Invisibility of Technology**: Users should focus on their content and goals, not on understanding the interface. |
| 17 | + |
| 18 | +### Visual Hierarchy & Layout |
| 19 | +- Use generous negative space to focus attention and create calm. |
| 20 | +- Maintain compositional balance with careful attention to visual weight. |
| 21 | +- Related elements should be visually grouped through proximity, alignment, and shared attributes. |
| 22 | +- Use grid/flex wrappers with `gap` for spacing rather than direct margins/padding on children. |
| 23 | + |
| 24 | +## Styling Implementation |
| 25 | +Use Tailwind CSS classes for styling. |
| 26 | +Follow shadcn/ui component patterns. |
| 27 | +Use CSS variables defined in src/App.css for theming. |
| 28 | +Prefer className over inline styles. |
| 29 | +Use shadcn/ui components instead of creating custom UI components. |
| 30 | +Follow the "new-york" style variant for shadcn/ui components. |
| 31 | +Design for desktop viewports - optimize for larger screens and precise mouse interactions. |
| 32 | + |
| 33 | +### Color Strategy |
| 34 | +- Use intentional color where every color has a specific purpose. |
| 35 | +- Prefer subtle, slightly desaturated colors rather than bold primary colors. |
| 36 | +- Limit accent colors to guide attention to the most important actions. |
| 37 | +- Ensure WCAG AA contrast compliance (4.5:1 for normal, 3:1 for large text). |
| 38 | + |
| 39 | +### Typography Excellence |
| 40 | +- Treat typography as a core design element, not an afterthought. |
| 41 | +- Establish clear visual distinction between different levels of information. |
| 42 | +- Use no more than 2-3 typefaces for the entire application. |
| 43 | +- Allow generous spacing around text elements (line height typically 1.5x font size for body text). |
| 44 | + |
| 45 | +## Interactive Elements |
| 46 | + |
| 47 | +### Buttons |
| 48 | +- Visually express the importance and function through appearance. |
| 49 | +- Every button must have distinct states: default, hover, active, focused, disabled. |
| 50 | +- Buttons should appear "pressable" through subtle shadows or dimensionality cues. |
| 51 | +- Optimize button sizes for mouse interaction (minimum 32×32px for desktop). |
| 52 | +- Use concise, action-oriented labels. |
| 53 | + |
| 54 | +### Animation & Motion |
| 55 | +- Every animation must serve a functional purpose (orient users, show relationships, provide feedback). |
| 56 | +- Movement should follow real-world physics with appropriate acceleration/deceleration. |
| 57 | +- Timing guidelines: button press (100-150ms), state changes (200-300ms), page transitions (300-500ms). |
| 58 | +- Animations should be felt rather than seen - avoid calling attention to themselves. |
| 59 | + |
| 60 | +### Color Strategy |
| 61 | +- Use intentional color where every color has a specific purpose. |
| 62 | +- Prefer subtle, slightly desaturated colors rather than bold primary colors. |
| 63 | +- Limit accent colors to guide attention to the most important actions. |
| 64 | +- Ensure WCAG AA contrast compliance (4.5:1 for normal, 3:1 for large text). |
| 65 | + |
| 66 | +### Typography Excellence |
| 67 | +- Treat typography as a core design element, not an afterthought. |
| 68 | +- Establish clear visual distinction between different levels of information. |
| 69 | +- Use no more than 2-3 typefaces for the entire application. |
| 70 | +- Allow generous spacing around text elements (line height typically 1.5x font size for body text). |
| 71 | + |
| 72 | +## Interactive Elements |
| 73 | + |
| 74 | +### Buttons |
| 75 | +- Visually express the importance and function through appearance. |
| 76 | +- Every button must have distinct states: default, hover, active, focused, disabled. |
| 77 | +- Buttons should appear "pressable" through subtle shadows or dimensionality cues. |
| 78 | +- Minimum touch target size of 44×44px for all interactive elements. |
| 79 | +- Use concise, action-oriented labels. |
| 80 | + |
| 81 | +### Animation & Motion |
| 82 | +- Every animation must serve a functional purpose (orient users, show relationships, provide feedback). |
| 83 | +- Movement should follow real-world physics with appropriate acceleration/deceleration. |
| 84 | +- Timing guidelines: button press (100-150ms), state changes (200-300ms), page transitions (300-500ms). |
| 85 | +- Animations should be felt rather than seen - avoid calling attention to themselves. |
| 86 | + |
| 87 | +## Form Handling |
| 88 | +Use React.FormEvent for form handling. |
| 89 | +Prefer controlled components for forms. |
| 90 | +Use e.preventDefault() in form submit handlers. |
| 91 | +Validate all inputs before submission. |
| 92 | +Handle form errors gracefully with user-friendly messages. |
| 93 | +Design fields that guide users through correct input with clear labeling and inline validation. |
0 commit comments