SmoothUI Component Craft
Orchestrate multiple quality skills through a strict phased workflow to produce polished, accessible, performant SmoothUI components.
Strict Workflow
Every component task follows these phases in order. Do not skip phases.
Phase 1: Brainstorm & Research
Invoke superpowers:brainstorming first to explore intent, requirements, and design before any code.
During brainstorming:
- Clarify what the component does and its interaction patterns
- Identify animation requirements (enter, exit, hover, state transitions)
- Decide Motion vs GSAP (prefer Motion unless complex morphing/timelines needed)
- Identify controlled/uncontrolled state needs
- List variants and props
After brainstorming, research existing components in packages/smoothui/components/ for similar patterns to follow.
Phase 2: Design with Interface Craft
Invoke interface-craft to design the animation and interaction layer:
- Define animation stages and sequencing
- Plan spring configurations (duration: 0.25, bounce: ≤0.1 for UI)
- Design hover/focus/active states
- Plan layout animations if needed
Output: animation spec with concrete Motion/GSAP values.
Phase 3: Implement
Read scaffolding templates from references/scaffolding.md for file templates.
Create all required files:
Component — packages/smoothui/components/[name]/index.tsx
"use client" directive if interactive
- Export types as
[ComponentName]Props
- Use
cn() from @repo/shadcn-ui/lib/utils
- Import
useReducedMotion from motion/react
package.json — packages/smoothui/components/[name]/package.json
- Use
workspace:* for internal deps
tsconfig.json — packages/smoothui/components/[name]/tsconfig.json
Export — Add to packages/smoothui/components/index.ts
Example — apps/docs/examples/[name].tsx
- Default export named
[ComponentName]Demo
- Show all variants
Docs — apps/docs/content/docs/components/[name].mdx
- Frontmatter: title, description, icon, dependencies, installer
- Use
<AutoTypeTable> for props
Navigation — Add to apps/docs/content/docs/components/meta.json alphabetically in correct section
Animation Requirements (non-negotiable)
- Import and use
useReducedMotion from motion/react
- When
shouldReduceMotion is true: instant transitions (duration: 0) or static state
- Only animate
transform and opacity
- Spring:
{ type: "spring", duration: 0.25, bounce: 0.1 }
- Enter easing:
cubic-bezier(.23, 1, .32, 1)
- Move easing:
cubic-bezier(0.645, 0.045, 0.355, 1)
- Never use string easing like
"easeInOut"
- Hover animations: detect hover-capable devices with
matchMedia("(hover: hover) and (pointer: fine)")
Accessibility Requirements (non-negotiable)
- Semantic HTML (
<button>, <nav>, not <div> with roles)
- ARIA attributes (
aria-label, aria-expanded, role, etc.)
- Keyboard navigation (arrow keys, Enter, Escape as appropriate)
- Proper
tabIndex management (never positive values)
- Alt text for images
- Color contrast compliance
Phase 4: Quality Review
Run all three review skills in sequence:
- Invoke
vercel-react-best-practices — Check React/Next.js performance patterns
- Invoke
web-design-guidelines — Check Web Interface Guidelines compliance
- Invoke
rams — Run accessibility and visual design review
Fix all issues found before considering the component complete.
Phase 5: Verify
- Run
pnpm check from project root to verify linting
- Run
pnpm build to verify the build passes
- Start dev server and visually verify in browser if possible
Improving Existing Components
For improvement tasks, skip Phase 1 brainstorming if the change is small (e.g., "add a variant"). Otherwise follow full workflow.
Always:
- Read the existing component first
- Identify what's missing (reduced motion? keyboard nav? hover detection?)
- Apply changes
- Run Phase 4 review skills
- Run Phase 5 verification
Quick Reference: File Paths
| File |
Path |
| Components |
packages/smoothui/components/[name]/ |
| Component index |
packages/smoothui/components/index.ts |
| Examples |
apps/docs/examples/[name].tsx |
| Docs |
apps/docs/content/docs/components/[name].mdx |
| Nav config |
apps/docs/content/docs/components/meta.json |
1---2name: smoothui-component-craft3description: Create, improve, fix, or review SmoothUI components with production-quality animations, accessibility, and performance. Orchestrates interface-craft, web-design-guidelines, rams, and vercel-react-best-practices skills for high-quality output. Use when the user wants to build a new component, add a variant, improve an existing component, fix a component bug, or review component quality in the SmoothUI project. Triggers on "create component", "build component", "new component", "add component", "improve component", "fix component", "review component", "add variant", "refactor component", or any component work in the smoothui monorepo.4---56# SmoothUI Component Craft78Orchestrate multiple quality skills through a strict phased workflow to produce polished, accessible, performant SmoothUI components.910## Strict Workflow1112Every component task follows these phases in order. Do not skip phases.1314### Phase 1: Brainstorm & Research1516**Invoke `superpowers:brainstorming` first** to explore intent, requirements, and design before any code.1718During brainstorming:19- Clarify what the component does and its interaction patterns20- Identify animation requirements (enter, exit, hover, state transitions)21- Decide Motion vs GSAP (prefer Motion unless complex morphing/timelines needed)22- Identify controlled/uncontrolled state needs23- List variants and props2425After brainstorming, research existing components in `packages/smoothui/components/` for similar patterns to follow.2627### Phase 2: Design with Interface Craft2829**Invoke `interface-craft`** to design the animation and interaction layer:30- Define animation stages and sequencing31- Plan spring configurations (duration: 0.25, bounce: ≤0.1 for UI)32- Design hover/focus/active states33- Plan layout animations if needed3435Output: animation spec with concrete Motion/GSAP values.3637### Phase 3: Implement3839Read scaffolding templates from [references/scaffolding.md](references/scaffolding.md) for file templates.4041Create all required files:42431. **Component** — `packages/smoothui/components/[name]/index.tsx`44 - `"use client"` directive if interactive45 - Export types as `[ComponentName]Props`46 - Use `cn()` from `@repo/shadcn-ui/lib/utils`47 - Import `useReducedMotion` from `motion/react`48492. **package.json** — `packages/smoothui/components/[name]/package.json`50 - Use `workspace:*` for internal deps51523. **tsconfig.json** — `packages/smoothui/components/[name]/tsconfig.json`53544. **Export** — Add to `packages/smoothui/components/index.ts`55565. **Example** — `apps/docs/examples/[name].tsx`57 - Default export named `[ComponentName]Demo`58 - Show all variants59606. **Docs** — `apps/docs/content/docs/components/[name].mdx`61 - Frontmatter: title, description, icon, dependencies, installer62 - Use `<AutoTypeTable>` for props63647. **Navigation** — Add to `apps/docs/content/docs/components/meta.json` alphabetically in correct section6566#### Animation Requirements (non-negotiable)6768- Import and use `useReducedMotion` from `motion/react`69- When `shouldReduceMotion` is true: instant transitions (`duration: 0`) or static state70- Only animate `transform` and `opacity`71- Spring: `{ type: "spring", duration: 0.25, bounce: 0.1 }`72- Enter easing: `cubic-bezier(.23, 1, .32, 1)`73- Move easing: `cubic-bezier(0.645, 0.045, 0.355, 1)`74- Never use string easing like `"easeInOut"`75- Hover animations: detect hover-capable devices with `matchMedia("(hover: hover) and (pointer: fine)")`7677#### Accessibility Requirements (non-negotiable)7879- Semantic HTML (`<button>`, `<nav>`, not `<div>` with roles)80- ARIA attributes (`aria-label`, `aria-expanded`, `role`, etc.)81- Keyboard navigation (arrow keys, Enter, Escape as appropriate)82- Proper `tabIndex` management (never positive values)83- Alt text for images84- Color contrast compliance8586### Phase 4: Quality Review8788Run all three review skills in sequence:89901. **Invoke `vercel-react-best-practices`** — Check React/Next.js performance patterns912. **Invoke `web-design-guidelines`** — Check Web Interface Guidelines compliance923. **Invoke `rams`** — Run accessibility and visual design review9394Fix all issues found before considering the component complete.9596### Phase 5: Verify9798- Run `pnpm check` from project root to verify linting99- Run `pnpm build` to verify the build passes100- Start dev server and visually verify in browser if possible101102## Improving Existing Components103104For improvement tasks, skip Phase 1 brainstorming if the change is small (e.g., "add a variant"). Otherwise follow full workflow.105106Always:1071. Read the existing component first1082. Identify what's missing (reduced motion? keyboard nav? hover detection?)1093. Apply changes1104. Run Phase 4 review skills1115. Run Phase 5 verification112113## Quick Reference: File Paths114115| File | Path |116|------|------|117| Components | `packages/smoothui/components/[name]/` |118| Component index | `packages/smoothui/components/index.ts` |119| Examples | `apps/docs/examples/[name].tsx` |120| Docs | `apps/docs/content/docs/components/[name].mdx` |121| Nav config | `apps/docs/content/docs/components/meta.json` |