generic-react-ux-designer
Professional UI/UX design expertise for React applications. Covers design thinking, user psychology (Hick's/Fitts's/Jakob's Law), visual hierarchy, interaction patterns, accessibility, performance-driven design, and design critique. Use when designing features, improving UX, solving user problems, or conducting design reviews.
What this skill does
# React UX Designer
Professional UX expertise for React/TypeScript applications.
**Extends:** [Generic UX Designer](../generic-ux-designer/SKILL.md) - Read base skill for design thinking process, user psychology, heuristic evaluation, and research methods.
## React Interaction Patterns
### Micro-interactions with Framer Motion
```tsx
// Checkbox animation
<motion.div
animate={{ scale: checked ? 1 : 0 }}
transition={{ type: "spring", stiffness: 500 }}
>
<Check className="w-4 h-4" />
</motion.div>
// Button press feedback
<motion.button
whileTap={{ scale: 0.98 }}
whileHover={{ scale: 1.02 }}
transition={{ type: "spring", stiffness: 400 }}
>
Click me
</motion.button>
// Toast notification
<motion.div
initial={{ opacity: 0, y: 50 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 50 }}
>
<Toast message={message} />
</motion.div>
```
### Loading States
```tsx
// Skeleton (preferred over spinners)
<div className="animate-pulse space-y-4">
<div className="h-8 bg-slate-200 rounded w-3/4" />
<div className="h-4 bg-slate-200 rounded" />
</div>
// Progress indicator for long operations
<div className="relative w-full h-2 bg-slate-200 rounded">
<motion.div
className="absolute h-full bg-primary rounded"
initial={{ width: 0 }}
animate={{ width: `${progress}%` }}
/>
</div>
```
### Optimistic UI Pattern
```tsx
const handleLike = async () => {
// Update UI immediately
setLiked(true);
setCount((c) => c + 1);
try {
await api.like(id);
} catch {
// Rollback on error
setLiked(false);
setCount((c) => c - 1);
toast.error("Failed to save");
}
};
```
## React Accessibility Patterns
### Focus Management
```tsx
// Modal focus trap
function Modal({ isOpen, onClose, children }: ModalProps) {
const modalRef = useRef<HTMLDivElement>(null);
useEffect(() => {
if (isOpen) {
const firstFocusable = modalRef.current?.querySelector(
"button, [href], input, select, textarea",
) as HTMLElement;
firstFocusable?.focus();
}
}, [isOpen]);
// Trap focus within modal
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === "Tab") {
const focusables = modalRef.current?.querySelectorAll(
"button, [href], input, select, textarea",
);
// Handle tab cycling...
}
if (e.key === "Escape") onClose();
};
return (
<div
ref={modalRef}
role="dialog"
aria-modal="true"
onKeyDown={handleKeyDown}
>
{children}
</div>
);
}
```
### Keyboard Navigation
```tsx
// Custom keyboard shortcut
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
e.preventDefault();
openCommandPalette();
}
};
window.addEventListener("keydown", handleKeyDown);
return () => window.removeEventListener("keydown", handleKeyDown);
}, []);
// Arrow key navigation in list
const handleKeyDown = (e: KeyboardEvent, index: number) => {
switch (e.key) {
case "ArrowDown":
e.preventDefault();
focusItem(index + 1);
break;
case "ArrowUp":
e.preventDefault();
focusItem(index - 1);
break;
}
};
```
### Motion Accessibility
```tsx
// Respect prefers-reduced-motion
const prefersReducedMotion = window.matchMedia(
"(prefers-reduced-motion: reduce)",
).matches;
<motion.div
initial={{ opacity: 0, y: prefersReducedMotion ? 0 : 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: prefersReducedMotion ? 0 : 0.3 }}
/>;
```
## Form UX Patterns
### React Hook Form Integration
```tsx
function ContactForm() {
const {
register,
handleSubmit,
formState: { errors },
} = useForm();
return (
<form onSubmit={handleSubmit(onSubmit)}>
<div className="space-y-1">
<label htmlFor="email" className="text-sm font-medium">
Email
</label>
<input
id="email"
{...register("email", { required: "Email is required" })}
aria-invalid={errors.email ? "true" : "false"}
aria-describedby={errors.email ? "email-error" : undefined}
className={cn("input", errors.email && "border-red-500")}
/>
{errors.email && (
<p id="email-error" className="text-sm text-red-500">
{errors.email.message}
</p>
)}
</div>
</form>
);
}
```
### Inline Validation
```tsx
// Validate on blur, show on focus
const [touched, setTouched] = useState(false);
const [error, setError] = useState("");
<input
onBlur={() => {
setTouched(true);
setError(validate(value));
}}
onFocus={() => setError("")} // Clear while editing
className={touched && error ? "border-red-500" : ""}
/>;
```
## Modal/Dialog Patterns
### Confirmation Dialog
```tsx
function ConfirmDialog({ isOpen, onConfirm, onCancel, title, message }: Props) {
return (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
className="fixed inset-0 z-50 flex items-center justify-center bg-black/50"
>
<motion.div
initial={{ scale: 0.95 }}
animate={{ scale: 1 }}
role="alertdialog"
aria-modal="true"
aria-labelledby="dialog-title"
aria-describedby="dialog-desc"
className="bg-white rounded-xl p-6 max-w-md"
>
<h2 id="dialog-title" className="text-lg font-semibold">
{title}
</h2>
<p id="dialog-desc" className="mt-2 text-muted">
{message}
</p>
<div className="mt-4 flex gap-3 justify-end">
<button onClick={onCancel} className="btn-secondary">
Cancel
</button>
<button onClick={onConfirm} className="btn-primary">
Confirm
</button>
</div>
</motion.div>
</motion.div>
);
}
```
### Command Palette (⌘K Pattern)
```tsx
function CommandPalette({ isOpen, onClose }: Props) {
const [query, setQuery] = useState("");
const inputRef = useRef<HTMLInputElement>(null);
useEffect(() => {
if (isOpen) inputRef.current?.focus();
}, [isOpen]);
const filtered = useMemo(
() =>
commands.filter((c) =>
c.label.toLowerCase().includes(query.toLowerCase()),
),
[query],
);
return (
<div role="dialog" aria-label="Command palette">
<input
ref={inputRef}
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Type a command..."
aria-autocomplete="list"
/>
<ul role="listbox">
{filtered.map((cmd) => (
<li key={cmd.id} role="option">
{cmd.label}
</li>
))}
</ul>
</div>
);
}
```
## Empty & Error States
```tsx
// Empty state with action
function EmptyState({ title, description, action }: Props) {
return (
<div className="text-center py-12">
<Icon className="mx-auto h-12 w-12 text-muted" />
<h3 className="mt-4 text-lg font-medium">{title}</h3>
<p className="mt-2 text-muted">{description}</p>
<button onClick={action.onClick} className="mt-4 btn-primary">
{action.label}
</button>
</div>
);
}
// Error state with retry
function ErrorState({ error, onRetry }: Props) {
return (
<div className="text-center py-12" role="alert">
<AlertCircle className="mx-auto h-12 w-12 text-red-500" />
<h3 className="mt-4 text-lg font-medium">Something went wrong</h3>
<p className="mt-2 text-muted">{error.message}</p>
<button onClick={onRetry} className="mt-4 btn-primary">
Try again
</button>
</div>
);
}
```
## React UX Checklist
**Interaction Quality:**
- [ ] Immediate feedback on user actions
- [ ] Loading states for async operations
- [ ] Optimistic updates where appropriate
- [ ] Smooth animations (60fps)
**Accessibility:**
- [ ] Keyboard navigation complete
- [ ] Focus management in modals
- [ ] Motion respects prefers-reduced-motion
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.