Create Custom Component
Create a component that matches your Figma design - stripping features not present in your design.
Figma URL
$ARGUMENTS
Instructions
- •
Read the project rules before starting:
- •
.ai-rules/conditional/custom-component-implementation.md- Custom component workflow - •
.ai-rules/global/storybook-stories.md- Storybook stories guidelines
- •
- •
Parse the Figma URL to extract the fileKey and nodeId
- •
Fetch Figma data using the Figma MCP tool (
get_figma_data) - •
Follow the custom-component-implementation.md workflow exactly:
- •Import from Untitled UI CLI as starting point
- •Simplify to match Figma 1:1 - remove variants, props, and sizes not in Figma
- •Update import paths to use
@/utils/cxand@/utils/is-react-component - •Add documentation header with Figma link
- •Apply the sortCx pattern with only Figma variants
- •Export from index files
- •
Follow the storybook-stories.md guidelines exactly:
- •Create all 3 required stories (Overview, Props, SourceCodeAndDesign)
- •Show ONLY variants that exist in your Figma
- •Organize argTypes by category
- •
Run Storybook to verify the implementation
When to Use
- •Figma component has been customized or simplified from Untitled UI
- •Only certain variants/sizes are needed
- •Design system has diverged from standard Untitled UI