Add a component from Figma

View as Markdown
Last updated September 14, 2026

studio:component:add generates a code component from a Figma design and writes the component file, its style file, and metadata into your project. It detects your project's styling method (Tailwind, CSS Modules, styled-components, or vanilla CSS) and matches it.

Use it when your team designs in Figma and you want the code component scaffolded for you instead of hand-writing it.

Usage

csdx studio:component:add --component-id=component-123

You get the component ID from the Studio Figma plugin. If you omit the flag, the CLI prompts for it. During the run it also shows hints and asks for an optional prompt to steer generation.

To override the detected styling method, answer the CLI's interactive prompt (for example "Use CSS Modules instead of Tailwind").

Flags

FlagAliasDescription
--component-id-iComponent ID from the Studio Figma plugin (prompted if omitted)

See also