Generating Components
Agent Workflow (MANDATORY)
Before ANY component generation, use TeamCreate to spawn 3 agents:
- fuse-ai-pilot:explore-codebase - Analyze existing UI patterns, colors, typography
- fuse-ai-pilot:research-expert - Verify latest component patterns via Context7
- mcp__magic__21st_magic_component_inspiration - Search 21st.dev for inspiration
After implementation, run fuse-ai-pilot:sniper for validation.
Overview
| Feature |
Description |
| Gemini Design MCP |
AI-powered frontend generation (create, modify, snippet) |
| 21st.dev |
Component inspiration and builder |
| shadcn/ui |
Copy-paste component library |
| Anti-AI-Slop |
Mandatory rules against generic designs |
Critical Rules
- ALWAYS use Gemini Design - Never write UI code manually
- Search inspiration first - 21st.dev before coding
- Match existing tokens - Analyze codebase before generating
- No forbidden fonts - Inter, Roboto, Arial are BANNED
- Framer Motion required - Every component needs animations
Architecture
components/
├── ui/
│ ├── Button.tsx (~40 lines)
│ ├── Card.tsx (~50 lines)
│ └── HeroSection.tsx (~80 lines)
└── sections/
├── HeroBackground.tsx (~30 lines)
└── FeatureGrid.tsx (~60 lines)
→ See hero-section.md for complete example
Reference Guide
Concepts
| Topic |
Reference |
When to Consult |
| Gemini Workflow |
gemini-design-workflow.md |
MANDATORY - Read first |
| 21st.dev |
21st-dev.md |
Component inspiration |
| shadcn/ui |
shadcn.md |
Component library |
| Buttons |
buttons-guide.md |
Button states, sizing |
| Forms |
forms-guide.md |
Validation, layout |
| Cards |
cards-guide.md |
Card patterns |
| Icons |
icons-guide.md |
Icon usage |
| UI Design |
ui-visual-design.md |
2026 trends, animations |
| Grids |
grids-layout.md |
Layout system |
| Patterns |
design-patterns.md |
Common patterns |
Templates
| Template |
When to Use |
| hero-section.md |
Landing page hero |
| hero-glassmorphism.md |
Glassmorphism hero |
| feature-grid.md |
Features showcase |
| pricing-card.md |
Pricing tiers |
| contact-form.md |
Contact forms |
| testimonial-card.md |
Reviews/testimonials |
| stats-section.md |
Stats with counters |
| faq-accordion.md |
FAQ sections |
Quick Reference
Gemini Design Tools
// Create full view from scratch
mcp__gemini-design__create_frontend({
prompt: "Hero section with glassmorphism",
designSystem: "contents of design-system.md"
})
// Modify existing component
mcp__gemini-design__modify_frontend({
existingCode: "<Button>...",
prompt: "Add hover animation"
})
// Generate snippet
mcp__gemini-design__snippet_frontend({
prompt: "Loading spinner"
})
→ See gemini-design-workflow.md for complete workflow
Anti-AI-Slop Table
| FORBIDDEN |
USE INSTEAD |
| Inter, Roboto, Arial |
Clash Display, Satoshi, Syne |
| Purple/pink gradients |
CSS variables, sharp accents |
| Border-left indicators |
Icon + bg-*/10 rounded |
| Flat backgrounds |
Glassmorphism, gradient orbs |
| No animations |
Framer Motion stagger |
→ See ui-visual-design.md for 2026 trends
Best Practices
DO
- Read gemini-design-workflow.md FIRST
- Search 21st.dev for inspiration before coding
- Match existing design tokens exactly
- Use Framer Motion for all animations
- Split components into <100 line files
DON'T
- Write UI code manually (use Gemini Design)
- Use forbidden fonts (Inter, Roboto, Arial)
- Skip inspiration search phase
- Forget hover/focus states
- Create components without animations
Framework Delegation (AFTER Gemini)
After generating UI, ALWAYS delegate to framework expert for SOLID validation.
Detection → Expert
| Project Files |
Delegate To |
next.config.* |
fuse-nextjs:nextjs-expert |
package.json + React |
fuse-react:react-expert |
composer.json |
fuse-laravel:laravel-expert |
Why Delegate?
design-expert handles:
- ✅ Beautiful UI (Anti-AI-Slop)
- ✅ Animations (Framer Motion)
- ✅ Accessibility (WCAG 2.2)
Framework expert handles:
- ✅ SOLID compliance (files < 100 lines)
- ✅ Framework patterns (App Router, Server Components)
- ✅ Integration (Better Auth, Prisma, TanStack)
Delegation Workflow
1. Generate component with Gemini Design
2. Detect framework from project files
3. Launch Task with framework expert
4. Expert validates SOLID + patterns
5. sniper runs final validation
1---2name: generating-components-23description: Use when generating UI components, buttons, forms, cards, hero sections, or using design tools. Covers Gemini Design MCP, shadcn/ui, 21st.dev, and Tailwind CSS.4---5
6# Generating Components
7
8## Agent Workflow (MANDATORY)
9
10Before ANY component generation, use `TeamCreate` to spawn 3 agents:
11
121. **fuse-ai-pilot:explore-codebase** - Analyze existing UI patterns, colors, typography
132. **fuse-ai-pilot:research-expert** - Verify latest component patterns via Context7
143. **mcp__magic__21st_magic_component_inspiration** - Search 21st.dev for inspiration
15
16After implementation, run **fuse-ai-pilot:sniper** for validation.
17
18---
19
20## Overview
21
22| Feature | Description |
23|---------|-------------|
24| **Gemini Design MCP** | AI-powered frontend generation (create, modify, snippet) |
25| **21st.dev** | Component inspiration and builder |
26| **shadcn/ui** | Copy-paste component library |
27| **Anti-AI-Slop** | Mandatory rules against generic designs |
28
29---
30
31## Critical Rules
32
331. **ALWAYS use Gemini Design** - Never write UI code manually
342. **Search inspiration first** - 21st.dev before coding
353. **Match existing tokens** - Analyze codebase before generating
364. **No forbidden fonts** - Inter, Roboto, Arial are BANNED
375. **Framer Motion required** - Every component needs animations
38
39---
40
41## Architecture
42
43```
44components/
45├── ui/
46│ ├── Button.tsx (~40 lines)
47│ ├── Card.tsx (~50 lines)
48│ └── HeroSection.tsx (~80 lines)
49└── sections/
50 ├── HeroBackground.tsx (~30 lines)
51 └── FeatureGrid.tsx (~60 lines)
52```
53
54→ See [hero-section.md](references/templates/hero-section.md) for complete example
55
56---
57
58## Reference Guide
59
60### Concepts
61
62| Topic | Reference | When to Consult |
63|-------|-----------|-----------------|
64| **Gemini Workflow** | [gemini-design-workflow.md](references/gemini-design-workflow.md) | MANDATORY - Read first |
65| **21st.dev** | [21st-dev.md](references/21st-dev.md) | Component inspiration |
66| **shadcn/ui** | [shadcn.md](references/shadcn.md) | Component library |
67| **Buttons** | [buttons-guide.md](references/buttons-guide.md) | Button states, sizing |
68| **Forms** | [forms-guide.md](references/forms-guide.md) | Validation, layout |
69| **Cards** | [cards-guide.md](references/cards-guide.md) | Card patterns |
70| **Icons** | [icons-guide.md](references/icons-guide.md) | Icon usage |
71| **UI Design** | [ui-visual-design.md](references/ui-visual-design.md) | 2026 trends, animations |
72| **Grids** | [grids-layout.md](references/grids-layout.md) | Layout system |
73| **Patterns** | [design-patterns.md](references/design-patterns.md) | Common patterns |
74
75### Templates
76
77| Template | When to Use |
78|----------|-------------|
79| [hero-section.md](references/templates/hero-section.md) | Landing page hero |
80| [hero-glassmorphism.md](references/templates/hero-glassmorphism.md) | Glassmorphism hero |
81| [feature-grid.md](references/templates/feature-grid.md) | Features showcase |
82| [pricing-card.md](references/templates/pricing-card.md) | Pricing tiers |
83| [contact-form.md](references/templates/contact-form.md) | Contact forms |
84| [testimonial-card.md](references/templates/testimonial-card.md) | Reviews/testimonials |
85| [stats-section.md](references/templates/stats-section.md) | Stats with counters |
86| [faq-accordion.md](references/templates/faq-accordion.md) | FAQ sections |
87
88---
89
90## Quick Reference
91
92### Gemini Design Tools
93
94```typescript
95// Create full view from scratch
96mcp__gemini-design__create_frontend({
97 prompt: "Hero section with glassmorphism",
98 designSystem: "contents of design-system.md"
99})
100
101// Modify existing component
102mcp__gemini-design__modify_frontend({
103 existingCode: "<Button>...",
104 prompt: "Add hover animation"
105})
106
107// Generate snippet
108mcp__gemini-design__snippet_frontend({
109 prompt: "Loading spinner"
110})
111```
112
113→ See [gemini-design-workflow.md](references/gemini-design-workflow.md) for complete workflow
114
115### Anti-AI-Slop Table
116
117| FORBIDDEN | USE INSTEAD |
118|-----------|-------------|
119| Inter, Roboto, Arial | Clash Display, Satoshi, Syne |
120| Purple/pink gradients | CSS variables, sharp accents |
121| Border-left indicators | Icon + bg-*/10 rounded |
122| Flat backgrounds | Glassmorphism, gradient orbs |
123| No animations | Framer Motion stagger |
124
125→ See [ui-visual-design.md](references/ui-visual-design.md) for 2026 trends
126
127---
128
129## Best Practices
130
131### DO
132- Read gemini-design-workflow.md FIRST
133- Search 21st.dev for inspiration before coding
134- Match existing design tokens exactly
135- Use Framer Motion for all animations
136- Split components into <100 line files
137
138### DON'T
139- Write UI code manually (use Gemini Design)
140- Use forbidden fonts (Inter, Roboto, Arial)
141- Skip inspiration search phase
142- Forget hover/focus states
143- Create components without animations
144
145---
146
147## Framework Delegation (AFTER Gemini)
148
149**After generating UI, ALWAYS delegate to framework expert for SOLID validation.**
150
151### Detection → Expert
152
153| Project Files | Delegate To |
154|---------------|-------------|
155| `next.config.*` | `fuse-nextjs:nextjs-expert` |
156| `package.json` + React | `fuse-react:react-expert` |
157| `composer.json` | `fuse-laravel:laravel-expert` |
158
159### Why Delegate?
160
161design-expert handles:
162- ✅ Beautiful UI (Anti-AI-Slop)
163- ✅ Animations (Framer Motion)
164- ✅ Accessibility (WCAG 2.2)
165
166Framework expert handles:
167- ✅ SOLID compliance (files < 100 lines)
168- ✅ Framework patterns (App Router, Server Components)
169- ✅ Integration (Better Auth, Prisma, TanStack)
170
171### Delegation Workflow
172
173```
1741. Generate component with Gemini Design
1752. Detect framework from project files
1763. Launch Task with framework expert
1774. Expert validates SOLID + patterns
1785. sniper runs final validation
179```