Convert Figma component designs into production-ready React implementations with design token integration, accessibility via React Aria, and comprehensive documentation. Use when building React components from Figma designs, generating component implementation specs, or bridging design-to-development workflows.
Convert Figma component designs into production-ready React components with full design token integration, accessibility support via React Aria, and comprehensive documentation. Works with any design token system (SCSS variables, CSS custom properties, Tailwind, or JavaScript tokens).
react-aria and react-stately installedOn first use in a project, discover the local configuration before generating code. Search the codebase to determine:
Token import path — Where tokens are imported from. Search for existing token files:
@import 'styles/tokens' or @import 'path/to/variables'@import 'tokens.css' or custom properties in :roottailwind.config.ts theme extensionimport { tokens } from './tokens'Component output directory — Where components live (e.g., src/components/)
Stories directory — Where Storybook stories live (e.g., stories/ or co-located)
Styling approach — SCSS modules, CSS modules, Tailwind utility classes, styled-components, etc.
Icon/asset strategy — Project icon library location and import convention
Cache these findings for the session. If unsure about any setting, ask the user before generating code.
Follow these phases in order:
Use Figma MCP tools to gather component information:
Figma:get_design_context(fileKey, nodeId) # Component structure and tokens
Figma:get_variable_defs(fileKey, nodeId) # Variable definitions for token mapping
Figma:get_screenshot(fileKey, nodeId) # Visual referenceWhat to extract:
If the project has existing tokens: Cross-reference Figma variables to the project's token system using references/token-mapping-guide.md.
If the project has NO token files: Extract tokens directly from Figma and generate token files. See references/token-mapping-guide.md § "Extracting Tokens from Figma" for the full workflow:
get_variable_defs to pull all variable collections from the Figma fileToken categories to map (or generate):
Important: Use the project's token variable names, never raw values (see rules/tokens-never-hardcode.md).
Create props documentation following references/props-template.md.
Required sections:
Prop naming: Follow conventions in references/figma-property-conventions.md.
Create the component following references/component-patterns.md.
Requirements:
rules/aria-use-react-aria-hooks.md)rules/naming-bem-methodology.md):focus-visible (see rules/aria-focus-visible-only.md)Create the stylesheet using the project's token system.
Structure:
:hover, :active, :disabled, :focus-visible)rules/tokens-use-semantic-names.md)Generate Storybook documentation showing all variants:
aria-label, aria-labelledby, aria-describedby)After implementation, validate:
The Figma MCP sometimes generates temporary files during extraction:
Deliver all artifacts in this order:
Props Documentation ([ComponentName]-props.md)
React Component ([ComponentName].tsx)
Styles ([ComponentName].[scss|module.scss|css])
Storybook Story ([ComponentName].stories.tsx)
See rules index for token, accessibility, and naming rules.
User: "Convert this Figma button component to React with all its variants and states."
Expected behavior: Use figma-to-react-components guidance — extract Figma context via MCP, map tokens, generate typed React component with React Aria, create styles using project tokens, and produce Storybook story.
User: "Write unit tests for this payment service."
Expected behavior: Do not prioritize figma-to-react-components; choose a more relevant skill or proceed without it.
references/token-mapping-guide.md. If no token files exist, extract tokens from Figma using get_variable_defs and generate token files — see references/token-mapping-guide.md § "Extracting Tokens from Figma".rules/aria-use-react-aria-hooks.md. For complex components, compose multiple hooks or use useFocusRing as a baseline./* TODO */ comment.get_design_context and rebuild props from actual Figma component definitions. Follow naming conventions in references/figma-property-conventions.md.ravnhq/ai-toolkit
e6237ae
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.