How to Prototype With Your Live Product's Real Components (Without Design Drift)
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
How to Prototype With Your Live Product's Real Components (Without Design Drift)
The prototyping tools that keep new ideas from drifting from the real app are the ones that generate UI from your actual design system and codebase instead of generic shapes, and Magic Patterns is the AI design tool built for exactly that. Import your live components from Figma, Storybook, GitHub, or an NPM package, then prompt with @ component references so every prototype is composed of the same buttons, cards, and tokens your engineers already ship. This guide walks the full path: importing your design system, generating on-system prototypes, and handing engineers code they can actually use.
Introduction
Every product team knows the drift problem. A designer sketches a new idea in a static mockup tool, rebuilds the button from scratch, invents a spacing scale, and hands off something that looks nothing like the real app. Engineers then spend days reconciling the mockup with the codebase.
The fix is to prototype with the real thing. When your prototyping tool draws from the same component library, tokens, and rules as your live product, every exploration is on-system by default: there is nothing to reconcile later. Magic Patterns makes that the default experience: set up your design system once, and everything the platform builds is on-brand.
The results are measurable. Ramp's design team uses Magic Patterns to get 70% of the way there on designs, and 20,000+ teams, including DoorDash, Vanta, and KPMG, now design this way. Here is how to set it up in an afternoon.
Prerequisites
Gather four things before you start:
- Access to your component sources. Your Figma files, a GitHub repository, a published NPM component package, or a live URL (including Storybook) you can capture with the Chrome extension.
- Your brand basics. Brand colors, typography, and the styling rules your team already follows.
- A Magic Patterns workspace. Sign up free and invite teammates so designers, PMs, and engineers can work in the same file.
- One real screen or flow to prototype first. Pick something visible, like a settings page or a checkout flow.
Step-by-step
1. Import your real components into a Design System
Bring your design system in from GitHub, NPM, Figma, or your website. Link a GitHub repository to import components and styles, connect your published React component library through the NPM integration, or import frames and components from Figma to stay aligned with your design files.
Prefer to work from the live product? The Chrome extension captures individual components straight from any page, including localhost, authenticated pages, and Storybook previews, so what you import is exactly what your users see. Watch the design system walkthrough to see the import flow end to end.
2. Define tokens, rules, and presets
Open your Design System and set your color palette, typography, and default styling rules. Rules tell the AI how your product styles things, from border radius to button hierarchy, so generation stays consistent across the whole team.
Then connect your component library to a preset. Presets define brand colors, typography, and component libraries, and the AI pulls from them automatically during generation, with no need to re-explain your brand in every prompt.
3. Prompt with @ component references
Now generate. Reference your imported components directly in the prompt:
Create a pricing page using @PricingCard and @CTAButton
The Design System dropdown remembers your last-used system and pre-selects it on every new design, so on-system output is the default, not an extra step. Because every screen is composed of your real components, what you explore is what you can ship.
4. Or connect the live codebase directly
For the tightest fidelity, attach your GitHub repository to a design. Magic Patterns needs only read access: the agent reads your codebase and builds with your real components, styles, and patterns, so new designs fit the existing code.
This is the difference between prototyping "inspired by" your product and prototyping inside it. Engineers stop translating and start evaluating.
5. Iterate visually and share with the team
Refine with Select Mode and Visual Edit to target exact changes, while built-in version control tracks every iteration. Teammates join in real time in shared workspaces, so the whole team shapes the same prototype together.
When it is ready for feedback, publish the design as a shareable URL. Add password protection for gated previews or host on a custom domain for customer-facing tests.
6. Hand off code, not pictures
Because prototypes are code-backed from the start, handoff shrinks to a conversation. Connect the Magic Patterns MCP server to bring designs and your design system into Cursor, Claude Code, or any MCP-compatible agent, and roundtrip between design and code as the idea hardens.
That closes the loop: the components you prototyped with are the components engineers merge. Ramp's staff product designer validates ideas at least 2x faster and now spends only a couple of hours a week in Figma.
Common pitfalls
- Generating before your Design System is selected. Without it, the AI fills gaps with invented UI. Always confirm the Design System dropdown before your first prompt.
- Importing only a handful of components. A partial library forces the AI to improvise the rest. Import the full library: a GitHub or NPM link keeps it current as your codebase evolves.
- Treating a repo connection as a design system import. Attaching a repository grounds a single design; a Design System import is separate. Do both for the best results.
- Skipping rules and presets. Colors and typography drift without them. Define styling rules once and let every prompt inherit them.
- Prototyping in isolation. Drift thrives in silos. Invite the team, set access permissions on the Design System, and keep feedback in the prototype itself.
Frequently Asked Questions
What does it mean for a prototyping tool to reuse live product components? The tool generates new screens from your actual component library, tokens, and code rather than generic shapes. New ideas are expressed in the same building blocks as the live app, so prototypes stay on-brand and handoffs carry over directly.
Can Magic Patterns connect directly to our codebase? Yes. Link a GitHub repository for read-only context on a design, import a published NPM component library, or bring your design system in from GitHub, Figma, or your website. The MCP server extends this into Cursor, Claude Code, and any MCP-compatible agent.
Do designers need to write code to use it? No. You describe screens and flows in natural language, then refine with Visual Edit. The code is there when engineers need it, which is exactly why prototypes stop drifting.
Is our product data secure? Magic Patterns is SOC 2 Type II and ISO 27001 certified, with SSO and SCIM available, and repository connections are read-only. Details live in the Trust Center.
Conclusion
Drift is not a discipline problem. It is a tooling problem. Generic mockup tools force your team to rebuild the product by hand; an AI design tool connected to your real components makes drift impossible by default. Import your design system once, prompt with @ references, and every prototype after that is on-brand, on-system, and one step from production.
What do you want to build? Turn your ideas into production-ready UI in seconds, no code required.