/figma-react:figma-design-reactfrom figma-react
Analyzes Figma designs and proposes React component architecture, props API, and variant handling from a Figma URL. Outputs design analysis and suggested API without building components.
Ships in figma-react. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill analyzes Figma designs and proposes React component architecture and props APIs. It helps bridge the gap between design and implementation by providing clear specifications before coding begins.
figma-connect-component for that)figma-component-sync for that)https://figma.com/design/{fileKey}/{fileName}?node-id={nodeId}Follow FIGMA structure exactly
When designing component APIs from Figma:
The component API should mirror how the design is structured in Figma, not how a component library would implement it. If Figma shows variants that change DOM structure, layout, or element ordering, the component API should reflect those structural changes through props.
Example:
type prop that controls both layout structure and alignmentbuttonLayout="vertical" and textAlign="center" which would deviate from the Figma structure┌─────────────────────────────────────────────────────────────────┐
│ 1. FETCH - Get Figma design context using MCP │
├─────────────────────────────────────────────────────────────────┤
│ 2. VALIDATE - Screenshot verification │
├─────────────────────────────────────────────────────────────────┤
│ 3. SAVE - Store design context in .temp/design-components/ │
├─────────────────────────────────────────────────────────────────┤
│ 4. ANALYZE - Review variants, properties, and nested components│
├─────────────────────────────────────────────────────────────────┤
│ 5. PROPOSE - Suggest component API(s) with props and types │
└─────────────────────────────────────────────────────────────────┘
Follow this sequence exactly:
Run get_design_context first to fetch the structured representation for the exact node(s).
If the response is too large or truncated, run get_metadata to get the high-level node map and then re-fetch only the required node(s) with get_design_context.
Run get_screenshot for a visual reference of the node variant being implemented.
Only after you have both get_design_context and get_screenshot, download any assets needed and start implementation.
Translate the output into this project's conventions, styles and framework. Reuse the project's color tokens, components, and typography wherever possible.
Validate against Figma for 1:1 look and behavior before marking complete.
Extract from the URL:
fileKey: The ID after /design/ (or after /branch/ if on a branch)nodeId: From node-id= query param (convert 123-456 → 123:456)Call mcp_figma_get_design_context with:
nodeId: The extracted node IDfileKey: The extracted file keyCreate the output directory:
.temp/design-components/{COMPONENT_NAME}/
Where {COMPONENT_NAME} is derived from the Figma component name (kebab-case).
Save the design context to .temp/design-components/{COMPONENT_NAME}/design-context.md:
# Design Context: {ComponentName}
## Figma Source
{original URL}
## Component Overview
{Brief description based on Figma data}
## Raw Design Data
{Full output from mcp_figma_get_design_context}
Extract and analyze:
Variants and Variant Options
Component Properties
Nested Components
Text Layers
Structural Differences
Child Component Configurability Assessment
When the parent component contains nested child component instances (e.g., a Dialog containing Buttons), critically evaluate whether those child components should be configurable by the user.
Common Design Pattern Gap: Designers may focus on the parent component's variants without considering that child component instances might need different configurations based on the use case. For example:
AlertDialog might always show the same "Cancel" and "Delete" buttons in FigmaWhen to Recommend Configurable Child Props:
Consider making child components configurable if:
How to Handle in API Design:
Instead of hardcoding child components, provide render prop or component prop patterns:
interface AlertDialogProps {
title: string;
description: string;
// Allow users to pass configured child instances
actionButton?: React.ReactNode;
cancelButton?: React.ReactNode;
// OR use render props for full control
renderActions?: (props: { onClose: () => void }) => React.ReactNode;
}
Example Usage:
<AlertDialog
title="Delete item?"
description="This action cannot be undone."
actionButton={
<Button variant="destructive" size="default">
Delete
</Button>
}
cancelButton={
<Button variant="outline" size="default">
Cancel
</Button>
}
/>
Document in Proposed API:
When recommending configurable child components, explain:
Example Documentation:
### Design Consideration: Configurable Buttons
**Figma shows:** Fixed "Cancel" and "Delete" buttons with specific variants
**Recommended approach:** Make buttons configurable via props
**Rationale:** Different alert dialogs need different button configurations:
- Destructive actions (delete, remove) need `variant="destructive"`
- Confirmations need `variant="primary"`
- Button labels vary by context ("Delete", "Remove", "Confirm", etc.)
The Figma design represents one use case, but the component should support flexible button configurations to handle all dialog scenarios.
Based on the analysis, create .temp/design-components/{COMPONENT_NAME}/proposed-api.md:
# Proposed API: {ComponentName}
## Figma Source
{original URL}
## Summary
{One paragraph describing what this component does}
## Recommended Component Structure
{Explain if this should be one component or multiple, and why}
---
## Component: {ComponentName}
### Props Interface
\`\`\`typescript
interface {ComponentName}Props {
// Mapped from Figma variant "Size"
size?: 'sm' | 'md' | 'lg';
// Mapped from Figma variant "Variant"
variant?: 'primary' | 'secondary' | 'outline';
// Mapped from Figma boolean "Disabled"
disabled?: boolean;
// Mapped from Figma text layer "Label"
children: React.ReactNode;
// Mapped from Figma instance "Icon"
icon?: React.ReactNode;
}
\`\`\`
### Prop Details
| Prop | Type | Default | Figma Source | Notes |
|------|------|---------|--------------|-------|
| size | `'sm' \| 'md' \| 'lg'` | `'md'` | Variant: Size | Maps Small→sm, Medium→md, Large→lg |
| variant | `'primary' \| 'secondary'` | `'primary'` | Variant: Type | - |
| disabled | `boolean` | `false` | Boolean: Disabled | - |
| children | `React.ReactNode` | required | Text: Label | - |
| icon | `React.ReactNode` | `undefined` | Instance: Icon | Only shown when Has Icon=true |
### Excluded from Props (Handled by Tailwind/Internal State)
| Figma Property | Reason |
|----------------|--------|
| State: Hover | Tailwind `hover:` modifier |
| State: Pressed | Tailwind `active:` modifier |
| State: Focused | Tailwind `focus-visible:` modifier |
### Example Usage
\`\`\`tsx
<{ComponentName} size="lg" variant="primary">
Click me
</{ComponentName}>
<{ComponentName} size="sm" icon={<IconPlus />}>
Add Item
</{ComponentName}>
\`\`\`
---
## Additional Components (if applicable)
{If the Figma component should be split into multiple React components, document each one here with the same structure}
Create separate components when:
Keep as one component when:
Include as props:
Exclude from props (handle internally):
hover, pressed, focused, activeloading might be a prop, but visual feedback is internal| Figma | React Prop |
|---|---|
Small, Medium, Large | 'sm', 'md', 'lg' |
Primary, Secondary | 'primary', 'secondary' |
Has Icon, Show Label | hasIcon: boolean, showLabel: boolean |
Yes/No, True/False | boolean |
| Title Case values | kebab-case or camelCase |
.temp/design-components/{component-name}/
├── design-context.md # Raw Figma data + URL
└── proposed-api.md # Suggested component API(s)
User: Design a React component from this Figma: https://figma.com/design/abc123/DesignSystem?node-id=100-200
Agent:
.temp/design-components/button/design-context.md with Figma dataproposed-api.md with:
ButtonProps interfaceAgent Response:
📋 Design analysis complete for Button!
Created: `.temp/design-components/button/`
## Proposed Structure
Single component: `Button`
## Props Summary
| Prop | Type | From Figma |
|------|------|------------|
| size | 'sm' \| 'md' \| 'lg' | Variant: Size |
| variant | 'primary' \| 'secondary' | Variant: Type |
| disabled | boolean | Boolean: Disabled |
| children | ReactNode | Text: Label |
| icon | ReactNode | Instance: Icon |
Excluded: Hover, Pressed, Focused states (CSS handles these)
See full details: `.temp/design-components/button/proposed-api.md`
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bitovi/ai-enablement-prompts --plugin figma-react4 skills in this plugin
/figma-component-syncCheck a React component against its Figma design source and identify differences. Use when reviewing component implementations, syncing designs, auditing visual accuracy, or updating components to match new Figma designs./figma-connect-componentGenerate Figma Code Connect mappings that link React components to their Figma counterparts. Use when a component exists in code and needs a Code Connect file so Figma shows real code snippets in Dev Mode. Also triggers on phrases like "connect this component to Figma", "generate Code Connect", "publish to Figma", "add figma.connect for this component", "link this to Figma Dev Mode"./figma-Other plugins' skills for the same job