OnyxMunk/AudioForge
0
1# ๐จ AudioForge Creative UI System
2
3## Philosophy
4**"Make users feel something, not just do something."**
5
6This UI system is built on the principle that **personality drives engagement**. Every animation, every piece of copy, every color choice is intentional and designed to create an emotional connection.
7
8---
9
10## ๐ฏ Core Components
11
12### 1. **SoundWaveBackground**
13```tsx
14<SoundWaveBackground />
15```
16- Canvas-based animated sine waves
17- Three layers with different frequencies
18- Subtle, atmospheric, non-intrusive
19- Auto-resizes on window change
20
21**Use when**: You want ambient motion in the background
22
23---
24
25### 2. **PromptSuggestions**
26```tsx
27<PromptSuggestions onSelectPrompt={(prompt) => setValue("prompt", prompt)} />
28```
29- 6 pre-built prompt templates
30- Emoji + title + full prompt
31- Hover effects: scale + color shift
32- Reduces friction for new users
33
34**Use when**: You have a text input that could benefit from examples
35
36---
37
38### 3. **MiniVisualizer**
39```tsx
40{showVisualizer && <MiniVisualizer />}
41```
42- Animated audio bars with gradients
43- 20 bars that pulse randomly
44- Appears on hover for completed items
45- Canvas-based for performance
46
47**Use when**: You want to show "this has audio" without playing it
48
49---
50
51### 4. **FooterStats**
52```tsx
53<FooterStats />
54```
55- Live statistics from API
56- Gradient counters with hover effects
57- Model badges with pulse indicators
58- Responsive grid layout
59
60**Use when**: You want to showcase usage/activity
61
62---
63
64### 5. **FloatingNotes** (Optional)
65```tsx
66<FloatingNotes />
67```
68- Musical notes that float upward
69- Randomized positions and durations
70- Very subtle, low opacity
71- Pure atmosphere
72
73**Use when**: You want extra ambient motion
74
75---
76
77## ๐จ Animation System
78
79### Entrance Animations
80```tsx
81className="animate-fade-in" // Smooth fade + slight upward
82className="animate-slide-in-left" // Slide from left
83className="animate-slide-in-right" // Slide from right (with delay)
84```
85
86### Continuous Animations
87```tsx
88className="animate-gradient" // Animated gradient background
89className="animate-pulse-glow" // Glowing pulse effect
90className="animate-bounce-subtle" // Gentle bounce
91className="animate-float-up" // Float upward (for notes)
92```
93
94### Staggered Lists
95```tsx
96{items.map((item, index) => (
97 <div
98 key={item.id}
99 style={{ animationDelay: `${index * 50}ms` }}
100 className="animate-fade-in"
101 >
102 <ItemCard item={item} />
103 </div>
104))}
105```
106
107---
108
109## ๐ญ Copy Writing Patterns
110
111### โ Before (Technical)
112```
113"Generate professional-quality music from text descriptions"
114"No generations found"
115"Processing..."
116```
117
118### โ
After (Emotional)
119```
120"Turn your imagination into sound. Describe it, and we'll compose it."
121"Your Canvas Awaits โ Time to create your first masterpiece!"
122"Forging your masterpiece... ๐ต"
123```
124
125### Randomized Messages
126```tsx
127const messages = [
128 "๐ต Your masterpiece is being forged!",
129 "๐ธ The AI musicians are tuning up!",
130 "๐บ The orchestra is assembling!",
131];
132const randomMessage = messages[Math.floor(Math.random() * messages.length)];
133```
134
135---
136
137## ๐จ Color System
138
139### Gradients
140```tsx
141// Primary gradient (blue โ purple)
142className="bg-gradient-to-r from-primary to-purple-500"
143
144// Success gradient (green โ emerald)
145className="bg-gradient-to-r from-green-500 to-emerald-500"
146
147// Accent gradient (blue โ cyan)
148className="bg-gradient-to-r from-blue-500 to-cyan-500"
149```
150
151### Status Colors
152```tsx
153// Processing
154className="text-primary bg-primary/10"
155
156// Completed
157className="text-green-600 bg-green-100 dark:bg-green-900/20"
158
159// Failed
160className="text-destructive bg-destructive/10"
161
162// Pending
163className="text-muted-foreground bg-muted"
164```
165
166---
167
168## ๐ฏ Hover Effects
169
170### Scale + Shadow
171```tsx
172className="hover:scale-105 hover:shadow-lg transition-all duration-300"
173```
174
175### Glow Effect
176```tsx
177className="hover:shadow-[0_0_30px_rgba(99,102,241,0.5)] transition-shadow"
178```
179
180### Color Shift
181```tsx
182className="text-muted-foreground hover:text-primary transition-colors"
183```
184
185### Rotate Icon
186```tsx
187className="group-hover:rotate-12 transition-transform"
188```
189
190---
191
192## ๐ต Empty States
193
194### Structure
1951. **Large Emoji** (text-6xl, animate-bounce-subtle)
1962. **Bold Headline** (gradient text, text-2xl)
1973. **Descriptive Text** (text-muted-foreground)
1984. **Call to Action** (pointer with emoji)
199
200### Example
201```tsx
202<div className="text-center py-16 bg-gradient-to-br from-secondary/30 to-secondary/10 border border-dashed border-primary/30 rounded-lg">
203 <div className="text-6xl mb-4 animate-bounce-subtle">๐ต</div>
204 <p className="text-2xl font-bold mb-2 bg-gradient-to-r from-primary to-purple-500 bg-clip-text text-transparent">
205 Your Canvas Awaits
206 </p>
207 <p className="text-muted-foreground mb-4">
208 No generations yet. Time to create your first masterpiece!
209 </p>
210 <div className="flex items-center justify-center gap-2 text-sm text-muted-foreground">
211 <span>๐</span>
212 <span>Start by describing your music on the left</span>
213 </div>
214</div>
215```
216
217---
218
219## ๐จ Loading States
220
221### Spinner + Pulse
222```tsx
223<div className="relative">
224 <Loader2 className="h-12 w-12 animate-spin text-primary" />
225 <div className="absolute inset-0 h-12 w-12 rounded-full bg-primary/20 animate-ping" />
226</div>
227<p className="text-sm text-muted-foreground animate-pulse">
228 Loading your creations...
229</p>
230```
231
232### Progress Bar (Indeterminate)
233```tsx
234<Progress value={undefined} className="h-1" />
235// Automatically shows animated gradient when value is undefined
236```
237
238---
239
240## ๐ฏ Form Enhancements
241
242### Emoji Labels
243```tsx
244<Label className="flex items-center gap-2">
245 <span className="text-2xl">๐ผ</span>
246 Describe your music
247</Label>
248```
249
250### Pro Tips
251```tsx
252<p className="text-xs text-muted-foreground mt-2">
253 ๐ก Tip: Be specific about instruments, mood, tempo, and style
254</p>
255```
256
257### Enhanced Placeholders
258```tsx
259placeholder="Try: 'A dreamy lo-fi hip-hop beat with vinyl crackle and soft piano melodies' or 'Epic orchestral soundtrack with soaring strings'"
260```
261
262---
263
264## ๐จ Typography System
265
266### Display Headings
267```tsx
268className="font-display text-6xl font-bold bg-gradient-to-r from-primary via-purple-500 to-primary/60 bg-clip-text text-transparent animate-gradient"
269```
270
271### Section Headings
272```tsx
273<div className="flex items-center gap-2">
274 <div className="w-1 h-8 bg-gradient-to-b from-primary to-purple-500 rounded-full" />
275 <h2 className="font-display text-2xl font-bold">Section Title</h2>
276</div>
277```
278
279---
280
281## ๐ฏ Status Badges
282
283### Structure
284```tsx
285<div className={cn("p-1.5 rounded-full", bgColor)}>
286 <StatusIcon className={cn("h-4 w-4", color)} />
287</div>
288<span className={cn("text-sm font-medium", color)}>
289 {label}
290</span>
291```
292
293### Config Pattern
294```tsx
295const statusConfig = {
296 processing: {
297 icon: Loader2,
298 label: "Processing",
299 color: "text-primary",
300 bgColor: "bg-primary/10",
301 },
302 completed: {
303 icon: CheckCircle2,
304 label: "Completed",
305 color: "text-green-600",
306 bgColor: "bg-green-100 dark:bg-green-900/20",
307 },
308};
309```
310
311---
312
313## ๐จ Tag System
314
315### Gradient Tags with Emojis
316```tsx
317<span className="px-3 py-1 text-xs bg-gradient-to-r from-primary/10 to-purple-500/10 border border-primary/20 rounded-full font-medium hover:scale-105 transition-transform">
318 ๐ธ Rock
319</span>
320```
321
322---
323
324## ๐ฏ Button Enhancements
325
326### Gradient Hover
327```tsx
328<Button className="relative overflow-hidden group/btn">
329 <span className="absolute inset-0 bg-gradient-to-r from-primary via-purple-500 to-primary opacity-0 group-hover/btn:opacity-100 transition-opacity duration-500" />
330 <span className="relative flex items-center justify-center">
331 <Sparkles className="mr-2 h-5 w-5 group-hover/btn:animate-bounce-subtle" />
332 Generate Music
333 </span>
334</Button>
335```
336
337---
338
339## ๐จ Header Pattern
340
341### Sticky with Blur
342```tsx
343<header className="sticky top-0 z-50 border-b bg-background/80 backdrop-blur-xl supports-[backdrop-filter]:bg-background/60 shadow-sm">
344```
345
346### Logo with Sparkle
347```tsx
348<div className="relative">
349 <Music className="h-7 w-7 text-primary group-hover:scale-110 transition-transform" />
350 <Sparkles className="h-3 w-3 text-primary absolute -top-1 -right-1 animate-pulse" />
351</div>
352```
353
354---
355
356## ๐ฏ Performance Tips
357
3581. **Use CSS animations** over JS when possible
3592. **Canvas animations** run on separate thread
3603. **Debounce** hover effects with `transition-all duration-300`
3614. **Lazy load** heavy components (visualizers, confetti)
3625. **Use `will-change`** sparingly for GPU acceleration
363
364---
365
366## ๐จ Accessibility
367
368- All animations respect `prefers-reduced-motion`
369- Canvas elements have `aria-hidden="true"`
370- Status badges use semantic colors + icons
371- Keyboard navigation maintained
372- Focus states preserved
373
374---
375
376## ๐ Quick Wins Checklist
377
378- [ ] Replace "Submit" with "Generate Music โจ"
379- [ ] Add emoji to all form labels
380- [ ] Create 3-6 prompt suggestions
381- [ ] Enhance empty state with emoji + gradient
382- [ ] Add hover scale to all cards
383- [ ] Add gradient to main heading
384- [ ] Create status badges with colors
385- [ ] Add loading message with personality
386- [ ] Add contextual tips below inputs
387- [ ] Create footer stats dashboard
388
389---
390
391**Remember**: Every pixel should spark joy. Every interaction should feel intentional. Every animation should have purpose.
392
393๐ผโก **Now go make something beautiful.**
394 