> ## Documentation Index
> Fetch the complete documentation index at: https://magicpatterns.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Local Code Folder

> Upload a zipped export of your component library from your machine

If your component library lives on your machine rather than in a connected repo, you can upload it directly. Magic Patterns reads your component source so generated designs use your real code and import paths.

## Upload your code

<Steps>
  <Step title="Open the Local Code connector">
    From your Design System, open the linked-sources panel (during onboarding, or later from **Access & Settings**) and choose **Link Local Code**.
  </Step>

  <Step title="Add your zipped export">
    Drag and drop, or click to browse for, a zipped export of your component library. Supported formats are `.zip`, `.tar.gz`, and `.tgz`. You can add more than one file.
  </Step>

  <Step title="Choose subfolders (optional)">
    After a file uploads, you can browse its contents and select specific subfolders to import (for example the folder that holds your components) so we only scan the relevant code.
  </Step>

  <Step title="Done">
    Once your uploads finish, continue. Magic Patterns scans the code and proposes the components, colors, and tokens it finds for you to review.
  </Step>
</Steps>

<Tip>
  Linking [GitHub](/documentation/design-systems/importing/github) instead keeps
  your Design System in sync with a repo you already maintain. Use a local
  upload when the code isn't in a repository Magic Patterns can reach.
</Tip>

## What's Next?

<CardGroup cols={2}>
  <Card title="GitHub" icon="github" href="/documentation/design-systems/importing/github">
    Link a repository to import components and styles straight from your code.
  </Card>

  <Card title="Importing overview" icon="layer-group" href="/documentation/design-systems/importing/overview">
    See every way to bring an existing design system into Magic Patterns.
  </Card>
</CardGroup>
