Prompt to convert a Framer export to Next.js

Short answer

This prompt asks an AI coding assistant to rebuild a WebExport copy of a Framer site as a Next.js App Router project. Framer output is rendered by minified script modules, so the assistant rebuilds sections from the rendered HTML and CSS, lists every animation it finds, and leaves the saved bundles alone until you decide.

Last reviewed

Key facts

  • Framer says a published site cannot be exported as standalone HTML, so the saved copy is a render of each page.
  • The saved script modules are minified, and hand-converting them is slower than rebuilding from the rendered markup.
  • Next.js app/ routes hold pages and public/ holds static assets.
  • Test status: Next.js steps tested on a real export (Next.js 16.4.6), Framer cleanup not yet tested.

The prompt

Paste this into your AI coding assistant with the unzipped export open, and replace the placeholders in square brackets.

Framer to Next.js
You are helping me move a static export of a Framer site to Next.js.

CONTEXT
- ./exported-site is a WebExport download of my Framer site: HTML, CSS, JavaScript, fonts and images.
- Live site for comparison: [LIVE_URL]. Final domain: [DOMAIN]. Host: [HOST: Vercel, Netlify, Cloudflare Pages, Amazon S3 or Nginx].

TARGET: Next.js
- Next.js App Router project in TypeScript, one page per route in app/<route>/page.tsx, shared header and footer in app/layout.tsx.
- Assets go to public/. Load needed scripts with next/script.
- Static export: [STATIC_EXPORT: yes or no]. If yes, set output to export and keep redirects and headers in the host's files.

FRAMER-SPECIFIC CLEANUP
- Treat the .mjs script modules as read-only. Do not try to edit or convert minified bundles.
- Rebuild sections from the rendered HTML and CSS. Attributes that start with data-framer- are markers, not content.
- List every animation you find, with the section it belongs to, and ask me whether to keep the saved Framer Motion bundle or rebuild it.
- Search for framerusercontent.com in HTML and CSS. Download or replace each hit.

RULES
- Keep the design and every URL path. List path changes in REDIRECTS.md.
- Do not invent content, prices or links. Report gaps in MIGRATION_NOTES.md.
- Build after each step and ask before deleting a script or stylesheet.

START
Inventory the folder, show me a plan, wait for my go-ahead, then convert the home page only.

How to run it

  1. Unzip the download to ./exported-site and open the project in your AI coding tool.
  2. Paste the prompt, approve the plan, then commit after each page that matches the live site.

What to expect from Framer to Next.js

A Framer page arrives as rendered HTML, CSS and JavaScript modules that build the layout in the browser. Those modules are minified bundles, and no assistant converts them reliably. The workable route is to treat the rendered HTML and CSS as the specification and rebuild each section as a React component.

Animation is the decision point. Framer Motion bundles travel with the export. You can keep them and load them as scripts, or rebuild the effects with CSS or a motion library. Ask the assistant to list every animated section first, then choose per section.

Questions the assistant should ask you

  • Which sections animate, and which of those must keep the saved Framer Motion bundle?
  • May the saved script modules load with next/script, or must the page work without them?
  • Is the Framer CMS content moving into files in this pass?

Verify the result

Run these from the project folder after each batch. The last command lists files that still refer to Framer.

terminal
npm install
npm run build
npm run start

# pages in the export vs routes in the project
find exported-site -name "*.html" | wc -l
find app -name "page.tsx" | wc -l

# files that still refer to the old platform
grep -rlE "framerusercontent.com" app public | head
  • next build finishes with no type or lint errors, and every old sitemap route returns 200.
  • With output set to export, the out folder holds one HTML file per route.
  • Open the network tab and confirm no request goes to framerusercontent.com.
  • Compare the first screen of each page with the live site at phone width.

What can go wrong

  • The assistant tries to read the minified modules and produces code that looks right and fails at runtime. Tell it to work from the rendered HTML.
  • Absolute-looking spacing copied from the render can break at other widths. Test at phone width after each component.
  • Redirects set in Framer settings are not in the files, so the new project has none until you add them in your host’s format.

Frequently asked questions

Can the assistant convert the Framer script bundles?

Not reliably. They are minified, so the prompt tells the assistant to rebuild from the rendered HTML and CSS and to list the animations separately.

Should I keep the Framer Motion bundles?

Keeping them is the fastest way to a matching site. Rebuilding with CSS or a motion library gives you code you can read. Decide per animated section after the assistant lists them.

Will the project still call framerusercontent.com?

It can, if a path was missed. The verify step greps for it, and any hit is a file to download or replace.

Is there a faster option than a full rebuild?

Yes. You can host the saved copy as it is. See the Framer on Vercel guide. Rebuild only if you want an editable codebase.

Official documentation

Free tools for this job

Start with the files

The prompt works on a WebExport download. Paste your public Framer URL into the export form and get a ZIP. The Free plan covers 1 site, 5 exports a month, 15 pages and 20 MB per export. Professional is a $9.99 one-time purchase with unlimited pages.