Designing Elegant Interfaces
Philosophy
World-class design is intentional, accessible, and delightful. Every element serves a purpose, every interaction feels natural, and the experience adapts gracefully across contexts.
Core Principles:
- Clarity over cleverness - Users should never wonder what to do next
- Consistency over novelty - Patterns should repeat predictably
- Performance over features - Fast, smooth interactions trump visual complexity
- Accessibility always - Design for all users from the start
- Progressive disclosure - Reveal complexity only when needed
- Intentional friction - Make destructive actions harder, constructive actions effortless
When to Use This Skill
Use this skill when:
- Building web applications with React/Next.js/similar frameworks
- Creating developer tools or technical interfaces
- Designing interfaces with chat, terminals, or code display
- Implementing real-time or streaming features
- Ensuring accessibility and responsive design
- Working with shadcn/ui, daisyUI, or HeroUI design systems
Design Process Workflow
Follow this workflow for optimal results:
1. Discovery & Planning (15-30 min)
Map User Experience:
# Create flow diagrams with Graphviz
cat > user-flow.dot << 'EOF'
digraph UserFlow {
Start -> "Observe State"
"Observe State" -> "Orient Understanding"
"Orient Understanding" -> "Decide Action"
"Decide Action" -> "Act Execute"
"Act Execute" -> "Observe State" [label="OODA loop"]
}
EOF
dot -Tpng user-flow.dot -o user-flow.png
OODA Loop Mapping:
For each major user goal, optimize the cycle:
- Observe - What information does the user need?
- Orient - How do they make sense of it?
- Decide - What choices are available?
- Act - How do they execute?
Document States:
- Entry points (how users arrive)
- Core loops (repeated actions)
- Success states (goals achieved)
- Failure states (errors, recovery paths)
- Edge cases (empty, loading, error, extreme data)
List Affordances:
Identify every UI element needed:
- Navigation (movement between sections)
- Actions (buttons, links, controls)
- Inputs (forms, editors, pickers)
- Feedback (success, error, loading)
- Content (text, images, data)
- Wayfinding (breadcrumbs, progress)
Before Building Custom Components:
- Search shadcn/ui first (https://ui.shadcn.com)
- Check daisyUI (https://daisyui.com)
- Explore HeroUI (https://heroui.com)
- Build custom only when necessary
2. Design Foundation (20-40 min)
Establish Visual System:
Read the detailed foundation guides:
foundation/typography.md - Font selection (Geist, JetBrains Mono), scales, loading
foundation/colors-and-spacing.md - Color palettes, spacing systems, dark mode
foundation/layout-patterns.md - Grids, containers, white space, responsive breakpoints
Quick Reference:
- Typography: Geist for UI, JetBrains Mono for code (14px minimum)
- Spacing: 8px base system (0.5rem, 1rem, 1.5rem, 2rem, 3rem, 4rem, 6rem, 8rem)
- Colors: Semantic tokens (--color-background, --color-primary, --color-error, etc.)
- Layout: Mobile-first, 12-column grid, generous white space
3. Interactive Elements (30-60 min)
For sophisticated interactive features, reference the specialized guides:
Chat & Messaging:
- Read
interactive/chat-and-messaging.md when building conversational interfaces
- Covers message states, streaming, auto-scrolling, markdown rendering
Terminals & Code Display:
- Read
interactive/terminals-and-code.md for terminal emulators, syntax highlighting, semantic highlighting
- Covers ANSI colors, Shiki integration, copy buttons, line highlighting
Streaming & Loading:
- Read
interactive/streaming-and-loading.md for progressive loading, streaming text, optimistic updates
- Covers skeleton screens, progress indicators, loading hierarchies
Diffs & Logs:
- Read
interactive/diffs-and-logs.md for version control UIs, log viewers
- Covers split/unified diffs, character-level changes, virtual scrolling
4. Implementation (1-3 hours)
Build Components:
- Read
implementation/components-and-accessibility.md for component architecture and WCAG compliance
- Use atomic design: atoms → molecules → organisms → templates → pages
- Ensure keyboard navigation and screen reader support
Optimize Performance:
- Read
implementation/performance.md for Core Web Vitals optimization
- Lazy load, code split, optimize images, measure with Lighthouse
Test & Refine:
- Read
implementation/testing-and-qa.md for comprehensive testing approach
- Test on multiple devices, screen sizes, and with accessibility tools
5. Validation & Refinement
Pre-Launch Checklist:
Quick Decision Tree
Need to understand the basics?
→ Read foundation/ files first
Building chat or messaging?
→ Read interactive/chat-and-messaging.md
Building terminal or code editor?
→ Read interactive/terminals-and-code.md
Need streaming or loading states?
→ Read interactive/streaming-and-loading.md
Building diffs or log viewers?
→ Read interactive/diffs-and-logs.md
Ready to implement?
→ Read implementation/ files
Need tools or want to avoid mistakes?
→ Read reference/ files
Design Systems Priority
shadcn/ui (https://ui.shadcn.com) - PRIMARY CHOICE
- Excellent accessibility defaults
- Radix UI primitives
- Tailwind-based, customizable
- Copy-paste into project
daisyUI (https://daisyui.com)
- Semantic component names
- Tailwind plugin
- Rapid prototyping
HeroUI (https://heroui.com)
- Modern, polished
- Strong design language
- Product interfaces
See reference/design-systems.md for detailed comparison and usage patterns.
Typography Standards
Use these fonts exclusively:
Never mix multiple sans-serif or multiple monospace fonts.
See foundation/typography.md for complete guidance.
Inspiration Sites
Study these for design patterns:
Common Anti-Patterns
Avoid these mistakes:
- ❌ Building custom components when design system has them
- ❌ Using absolute positioning for layout
- ❌ Animating expensive properties (width, height)
- ❌ Skipping mobile testing
- ❌ Ignoring accessibility
- ❌ Using
<div> for everything
- ❌ Mixing multiple monospace fonts
- ❌ Auto-scrolling when user is reading
- ❌ Showing raw ANSI codes in terminals
- ❌ Forgetting empty/loading/error states
See reference/anti-patterns.md for complete list with explanations.
Iterative Development
For simple interfaces (single page, few components):
- Start with foundation (read foundation files)
- Use design system components
- Test and refine
For complex interfaces (multiple features, interactive elements):
- Map flows and create diagrams
- Establish foundation (read foundation files)
- Build one feature at a time (read relevant interactive files)
- Test each feature before moving to next
- Optimize and polish (read implementation files)
For developer tools or technical interfaces:
- Map OODA loops carefully
- Read ALL interactive files (chat, terminals, code, streaming, diffs, logs)
- Focus on keyboard navigation and performance
- Test with actual technical content
Getting Help
If unsure where to start:
- Read the philosophy section above
- Follow the Design Process Workflow
- Reference specific guides as needed
If design feels off:
- Check against principles (clarity, consistency, performance)
- Review anti-patterns list
- Study inspiration sites
- Test with real users
If implementation is slow:
- Use design system components first
- Don't build what exists
- Focus on one feature at a time
- Test early and often
File Organization
elegant-design/
├── SKILL.md (you are here)
├── foundation/
│ ├── typography.md (fonts, scales, loading)
│ ├── colors-and-spacing.md (palettes, spacing system, dark mode)
│ └── layout-patterns.md (grids, containers, responsive)
├── interactive/
│ ├── chat-and-messaging.md (chat UIs, streaming messages)
│ ├── terminals-and-code.md (terminals, syntax highlighting)
│ ├── streaming-and-loading.md (progressive loading, skeletons)
│ └── diffs-and-logs.md (version control UI, log viewers)
├── implementation/
│ ├── components-and-accessibility.md (architecture, WCAG)
│ ├── performance.md (Core Web Vitals, optimization)
│ └── testing-and-qa.md (testing checklist, tools)
└── reference/
├── design-systems.md (shadcn, daisyUI, HeroUI details)
├── tools-and-libraries.md (complete tool list)
└── anti-patterns.md (what not to do, with explanations)
Remember
World-class design is invisible. Users shouldn't notice your clever solutions - they should simply accomplish their goals effortlessly and maybe smile along the way.
Start simple, iterate based on real use. Don't build everything at once. Build what's needed, test it, refine it, then move to the next feature.
Accessibility is not optional. Design for keyboard navigation, screen readers, and sufficient contrast from the start. Retrofitting is much harder.
Performance matters. A beautiful interface that's slow is a bad interface. Measure performance early and often.
1---2name: elegant-design3description: Create world-class, accessible, responsive interfaces with sophisticated interactive elements including chat, terminals, code display, and streaming content. Use when building user interfaces that need professional polish and developer-focused features.4---5
6# Designing Elegant Interfaces
7
8## Philosophy
9
10World-class design is intentional, accessible, and delightful. Every element serves a purpose, every interaction feels natural, and the experience adapts gracefully across contexts.
11
12**Core Principles:**
13- **Clarity over cleverness** - Users should never wonder what to do next
14- **Consistency over novelty** - Patterns should repeat predictably
15- **Performance over features** - Fast, smooth interactions trump visual complexity
16- **Accessibility always** - Design for all users from the start
17- **Progressive disclosure** - Reveal complexity only when needed
18- **Intentional friction** - Make destructive actions harder, constructive actions effortless
19
20## When to Use This Skill
21
22Use this skill when:
23- Building web applications with React/Next.js/similar frameworks
24- Creating developer tools or technical interfaces
25- Designing interfaces with chat, terminals, or code display
26- Implementing real-time or streaming features
27- Ensuring accessibility and responsive design
28- Working with shadcn/ui, daisyUI, or HeroUI design systems
29
30## Design Process Workflow
31
32Follow this workflow for optimal results:
33
34### 1. Discovery & Planning (15-30 min)
35
36**Map User Experience:**
37```bash
38# Create flow diagrams with Graphviz
39cat > user-flow.dot << 'EOF'
40digraph UserFlow {
41 Start -> "Observe State"
42 "Observe State" -> "Orient Understanding"
43 "Orient Understanding" -> "Decide Action"
44 "Decide Action" -> "Act Execute"
45 "Act Execute" -> "Observe State" [label="OODA loop"]
46}
47EOF
48
49dot -Tpng user-flow.dot -o user-flow.png
50```
51
52**OODA Loop Mapping:**
53For each major user goal, optimize the cycle:
541. **Observe** - What information does the user need?
552. **Orient** - How do they make sense of it?
563. **Decide** - What choices are available?
574. **Act** - How do they execute?
58
59**Document States:**
60- Entry points (how users arrive)
61- Core loops (repeated actions)
62- Success states (goals achieved)
63- Failure states (errors, recovery paths)
64- Edge cases (empty, loading, error, extreme data)
65
66**List Affordances:**
67Identify every UI element needed:
68- Navigation (movement between sections)
69- Actions (buttons, links, controls)
70- Inputs (forms, editors, pickers)
71- Feedback (success, error, loading)
72- Content (text, images, data)
73- Wayfinding (breadcrumbs, progress)
74
75**Before Building Custom Components:**
761. Search shadcn/ui first (https://ui.shadcn.com)
772. Check daisyUI (https://daisyui.com)
783. Explore HeroUI (https://heroui.com)
794. Build custom only when necessary
80
81### 2. Design Foundation (20-40 min)
82
83**Establish Visual System:**
84
85Read the detailed foundation guides:
86- `foundation/typography.md` - Font selection (Geist, JetBrains Mono), scales, loading
87- `foundation/colors-and-spacing.md` - Color palettes, spacing systems, dark mode
88- `foundation/layout-patterns.md` - Grids, containers, white space, responsive breakpoints
89
90**Quick Reference:**
91- **Typography**: Geist for UI, JetBrains Mono for code (14px minimum)
92- **Spacing**: 8px base system (0.5rem, 1rem, 1.5rem, 2rem, 3rem, 4rem, 6rem, 8rem)
93- **Colors**: Semantic tokens (--color-background, --color-primary, --color-error, etc.)
94- **Layout**: Mobile-first, 12-column grid, generous white space
95
96### 3. Interactive Elements (30-60 min)
97
98For sophisticated interactive features, reference the specialized guides:
99
100**Chat & Messaging:**
101- Read `interactive/chat-and-messaging.md` when building conversational interfaces
102- Covers message states, streaming, auto-scrolling, markdown rendering
103
104**Terminals & Code Display:**
105- Read `interactive/terminals-and-code.md` for terminal emulators, syntax highlighting, semantic highlighting
106- Covers ANSI colors, Shiki integration, copy buttons, line highlighting
107
108**Streaming & Loading:**
109- Read `interactive/streaming-and-loading.md` for progressive loading, streaming text, optimistic updates
110- Covers skeleton screens, progress indicators, loading hierarchies
111
112**Diffs & Logs:**
113- Read `interactive/diffs-and-logs.md` for version control UIs, log viewers
114- Covers split/unified diffs, character-level changes, virtual scrolling
115
116### 4. Implementation (1-3 hours)
117
118**Build Components:**
119- Read `implementation/components-and-accessibility.md` for component architecture and WCAG compliance
120- Use atomic design: atoms → molecules → organisms → templates → pages
121- Ensure keyboard navigation and screen reader support
122
123**Optimize Performance:**
124- Read `implementation/performance.md` for Core Web Vitals optimization
125- Lazy load, code split, optimize images, measure with Lighthouse
126
127**Test & Refine:**
128- Read `implementation/testing-and-qa.md` for comprehensive testing approach
129- Test on multiple devices, screen sizes, and with accessibility tools
130
131### 5. Validation & Refinement
132
133**Pre-Launch Checklist:**
134- [ ] User flows tested and OODA loops optimized
135- [ ] All states handled (empty, loading, error, success)
136- [ ] Mobile responsive (tested on real devices)
137- [ ] Accessibility compliant (WCAG AA)
138- [ ] Performance measured (Lighthouse score > 90)
139- [ ] Geist used for UI, JetBrains Mono for code
140- [ ] Design system components used where possible
141- [ ] Consistent spacing and typography
142- [ ] Both light and dark modes work
143- [ ] Keyboard navigation complete
144- [ ] Interactive elements polished (see interactive guides)
145
146## Quick Decision Tree
147
148**Need to understand the basics?**
149→ Read `foundation/` files first
150
151**Building chat or messaging?**
152→ Read `interactive/chat-and-messaging.md`
153
154**Building terminal or code editor?**
155→ Read `interactive/terminals-and-code.md`
156
157**Need streaming or loading states?**
158→ Read `interactive/streaming-and-loading.md`
159
160**Building diffs or log viewers?**
161→ Read `interactive/diffs-and-logs.md`
162
163**Ready to implement?**
164→ Read `implementation/` files
165
166**Need tools or want to avoid mistakes?**
167→ Read `reference/` files
168
169## Design Systems Priority
170
1711. **shadcn/ui** (https://ui.shadcn.com) - PRIMARY CHOICE
172 - Excellent accessibility defaults
173 - Radix UI primitives
174 - Tailwind-based, customizable
175 - Copy-paste into project
176
1772. **daisyUI** (https://daisyui.com)
178 - Semantic component names
179 - Tailwind plugin
180 - Rapid prototyping
181
1823. **HeroUI** (https://heroui.com)
183 - Modern, polished
184 - Strong design language
185 - Product interfaces
186
187See `reference/design-systems.md` for detailed comparison and usage patterns.
188
189## Typography Standards
190
191**Use these fonts exclusively:**
192
193- **Geist** (https://vercel.com/font) - For ALL interface text
194 - UI labels, body text, headings
195 - 95% of your typography
196
197- **JetBrains Mono** (https://jetbrains.com/mono) - For ALL code/technical content
198 - Code blocks, terminals, logs, diffs
199 - 14px minimum size
200 - Enable ligatures
201
202Never mix multiple sans-serif or multiple monospace fonts.
203
204See `foundation/typography.md` for complete guidance.
205
206## Inspiration Sites
207
208Study these for design patterns:
209- **Vercel** (https://vercel.com) - Generous white space, clear typography
210- **Hex** (https://hex.tech) - Data-dense but organized
211- **Baseten** (https://docs.baseten.co) - Clear documentation structure
212- **Weather Underground** (https://wunderground.com) - Complex data, clean presentation
213- **Ghostty** (https://ghostty.org) - Modern terminal, elegant design
214
215## Common Anti-Patterns
216
217**Avoid these mistakes:**
218- ❌ Building custom components when design system has them
219- ❌ Using absolute positioning for layout
220- ❌ Animating expensive properties (width, height)
221- ❌ Skipping mobile testing
222- ❌ Ignoring accessibility
223- ❌ Using `<div>` for everything
224- ❌ Mixing multiple monospace fonts
225- ❌ Auto-scrolling when user is reading
226- ❌ Showing raw ANSI codes in terminals
227- ❌ Forgetting empty/loading/error states
228
229See `reference/anti-patterns.md` for complete list with explanations.
230
231## Iterative Development
232
233**For simple interfaces (single page, few components):**
2341. Start with foundation (read foundation files)
2352. Use design system components
2363. Test and refine
237
238**For complex interfaces (multiple features, interactive elements):**
2391. Map flows and create diagrams
2402. Establish foundation (read foundation files)
2413. Build one feature at a time (read relevant interactive files)
2424. Test each feature before moving to next
2435. Optimize and polish (read implementation files)
244
245**For developer tools or technical interfaces:**
2461. Map OODA loops carefully
2472. Read ALL interactive files (chat, terminals, code, streaming, diffs, logs)
2483. Focus on keyboard navigation and performance
2494. Test with actual technical content
250
251## Getting Help
252
253**If unsure where to start:**
2541. Read the philosophy section above
2552. Follow the Design Process Workflow
2563. Reference specific guides as needed
257
258**If design feels off:**
2591. Check against principles (clarity, consistency, performance)
2602. Review anti-patterns list
2613. Study inspiration sites
2624. Test with real users
263
264**If implementation is slow:**
2651. Use design system components first
2662. Don't build what exists
2673. Focus on one feature at a time
2684. Test early and often
269
270## File Organization
271
272```
273elegant-design/
274├── SKILL.md (you are here)
275├── foundation/
276│ ├── typography.md (fonts, scales, loading)
277│ ├── colors-and-spacing.md (palettes, spacing system, dark mode)
278│ └── layout-patterns.md (grids, containers, responsive)
279├── interactive/
280│ ├── chat-and-messaging.md (chat UIs, streaming messages)
281│ ├── terminals-and-code.md (terminals, syntax highlighting)
282│ ├── streaming-and-loading.md (progressive loading, skeletons)
283│ └── diffs-and-logs.md (version control UI, log viewers)
284├── implementation/
285│ ├── components-and-accessibility.md (architecture, WCAG)
286│ ├── performance.md (Core Web Vitals, optimization)
287│ └── testing-and-qa.md (testing checklist, tools)
288└── reference/
289 ├── design-systems.md (shadcn, daisyUI, HeroUI details)
290 ├── tools-and-libraries.md (complete tool list)
291 └── anti-patterns.md (what not to do, with explanations)
292```
293
294## Remember
295
296**World-class design is invisible.** Users shouldn't notice your clever solutions - they should simply accomplish their goals effortlessly and maybe smile along the way.
297
298**Start simple, iterate based on real use.** Don't build everything at once. Build what's needed, test it, refine it, then move to the next feature.
299
300**Accessibility is not optional.** Design for keyboard navigation, screen readers, and sufficient contrast from the start. Retrofitting is much harder.
301
302**Performance matters.** A beautiful interface that's slow is a bad interface. Measure performance early and often.