Figma

From vultisig/vultisig-windows · View interactive version

Figma is an AI agent skill from the GitHub repository vultisig/vultisig-windows. Implement UI from Figma designs using MCP tools. Use when a prompt includes a Figma link, or when implementing/updating UI components based on a Figma design.

How to use this skill

Skill file

Figma Design Implementation

Figma MCP Usage

Mandatory Design-to-Code Mapping

Before writing ANY implementation code from a Figma design, you MUST extract and explicitly list a property mapping table in the plan. Do NOT skip this step. Do NOT guess or assume values.

1. Extract every property from every element

For EACH element in the Figma get_design_context output, extract:

2. Present the mapping table in the plan

Use this format:

| Element        | Figma Property | Figma Value    | Code Prop/Token                  |
|----------------|---------------|----------------|----------------------------------|
| Icon           | color         | (from design)  | getColor('contrast')             |
| Message        | color         | (from design)  | Text color="supporting"          |
| Button         | bg            | (from design)  | Button kind="secondary"          |
| Button         | height        | 46px           | Button size="md"                 |
| Icon<>Message  | gap           | 8px            | VStack gap={8}                   |
| Message<>Btn   | gap           | 24px           | VStack gap={24}                  |

3. Cross-reference component props with Figma values

When the design uses a known codebase component (Button, Text, etc.):

4. Never assume defaults

Typography Variants

The Text component supports named variant props that map to Figma's named typography styles. Always use a variant when the Figma style name matches one in this table.

| Figma Style Name | variant prop | size | weight | line-height | letter-spacing |

|---------------------------|----------------|------|--------|-------------|----------------|

| Hero/H1 | h1Hero | 54 | 500 | 1.5 | — |

| Regular/H1 | h1Regular | 42 | 500 | 1.5 | — |

| Supplementary/Footnote | footnote | 13 | 500 | 1.385 | 0.06px |

Usage

// Figma shows "Supplementary/Footnote" style → use variant
<Text variant="footnote" color="shy">Description text</Text>

// Figma shows a style NOT in the table → create a new variant first
// 1. Add to TextVariant type in lib/ui/text/index.tsx
// 2. Add to textVariantsRecord with exact Figma values
// 3. Then use it: <Text variant="newVariant" color="...">

Rules

Icon Sourcing

Figma MCP does not reliably export SVG icon paths. When implementing a design with icons:

  1. Check if the icon already exists in lib/ui/icons/. Search by visual description or name.
  2. If the icon does NOT exist, ask the user to provide the exact SVG from Figma. Say: "I need the SVG for [icon description]. Could you paste it from Figma?"
  3. Never approximate, invent, or use a "similar" icon. The exact SVG from the design must be used.
  4. When creating a new icon from user-provided SVG, follow the svg-icon-pattern skill.

Screen Layout

When implementing a full screen from a Figma design, always use ScreenLayout from lib/ui/layout/ScreenLayout/ScreenLayout.tsx. Do NOT manually compose PageHeader + PageContent + PageFooter.

API

import { ScreenLayout } from '@lib/ui/layout/ScreenLayout/ScreenLayout'

<ScreenLayout
  title="Screen Title"        // optional — centered in header
  onBack={() => goBack()}     // optional — shows back button (IconButton secondary lg)
  footer={<Button>Action</Button>}  // optional — sticky footer
>
  {/* scrollable content */}
</ScreenLayout>

Props

| Prop | Type | Description |

|------------|----------------|-----------------------------------------------------------------------------|

| children | ReactNode | Main content — placed in a centered column (max 500px, 24px side padding) |

| title | ReactNode | Optional header title, centered |

| onBack | () => void | If provided, renders a back button in the header |

| footer | ReactNode | Optional sticky footer, same centered column width as content |

Behavior

Mapping Figma screens to ScreenLayout

When you see a Figma screen with a back chevron button and/or a centered title at the top:

When you see a primary action button pinned at the bottom of the screen:

Everything between the header and footer is children.

Vertical centering

If children need to fill the available vertical space (e.g., a centered animation), wrap them in a VStack with flexGrow and justifyContent="center".

Background decorations

If the screen has a background decoration (gradient, pattern), wrap ScreenLayout in a positioned container and place the decoration as a sibling:

<Wrapper>        {/* position: relative; height: 100% */}
  <Gradient />   {/* position: absolute; z-index: 0 */}
  <ScreenLayout onBack={...} footer={...}>
    {/* content */}
  </ScreenLayout>
</Wrapper>

Key Component References

Consult these files for implementation details:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.