Book a call and our team will help set this
up. We are working towards making this self-serve!
- Use your actual component code in generated designs
- Respect your component APIs, props, and variants
- Generate code with correct import paths
- Stay consistent with your design system
Everything on this page is guidance, not a checklist. We work with you during
onboarding and adapt to how your team already ships components. For example,
we have connected teams using the public NPM registry, private NPM, and GitHub
Packages (an npm-compatible registry with a read-only token and
.npmrc
scoped to your organization). Prefer working from a repository instead? See
linking GitHub.What we need
To import your components, we need two things:- Component code: either via an NPM package plus access token, or a zip or tar bundle you send manually. This lets us render the components in the Magic Patterns editor and ensures visual parity.
- Component documentation: either via Storybook or a custom MCP. This serves as context for the AI to understand your components and when to use each one.
npm pack tarball you send manually fills the same role.
Package structure
We recommend keeping Storybook files next to your component sources so documentation stays close to the code and is easier for the AI to relate to usage.React Components
Your code must be written in React.
Ways to share
- Registry token
- Manual Bundle
If your package is on a private registry (NPM, GitHub Packages, or another npm-compatible host), share a read-only access token.Share this token securely with your Magic Patterns contact.
Documentation best practices
Good documentation helps the AI understand not only what your components do, but when to use them.Usage guidance
For each component, cover:- Purpose: what problem the component solves
- When to use: which scenarios should lead to this component
- When not to use: anti-patterns or wrong fits
- Variants: when each variant is appropriate
Working with multiple packages
Many design systems split across packages that depend on each other. Magic Patterns supports that layout.Monorepo
Multiple packages in one repository (for example Yarn workspaces, Turborepo,
or Nx)
Multi-Repo
Separate repositories for packages that depend on each other
- Import from the correct package
- Use shared tokens in a consistent way
- Respect your component layering
- Package list: every package that belongs to the design system
- Dependency graph: how those packages relate
- Access tokens: credentials for each private package when needed
Next steps
Schedule a call
Book time to plan connecting your real component library with your team.