Prompt to convert a Framer export to Tailwind CSS
This prompt asks an AI coding assistant to build a Tailwind theme and utility-class markup from a WebExport copy of a Framer site. Framer output carries generated class names and inline values, so the assistant extracts tokens first, rebuilds sections with utilities, and leaves the saved script modules untouched.
Last reviewed
Key facts
- Framer says a published site cannot be exported as standalone HTML, so the saved copy is a render.
- Tailwind theme variables such as --color-* and --font-* sit in an @theme block.
- Saved Framer pages mix generated class names with values set directly on elements.
- Test status: Tailwind CSS steps tested on a real export (Tailwind CSS 4.3.5), 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.
You are helping me move a static export of a Framer site to Tailwind CSS.
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: Tailwind CSS on the existing HTML
- Keep the HTML pages. Install tailwindcss and @tailwindcss/cli, and start src/input.css with @import "tailwindcss".
- Put the old colors, fonts and radii into an @theme block, then rewrite classes to utilities one component at a time.
- Keep the old stylesheet linked until a page matches the live site.
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
- Work on a copy of the unzipped folder so you keep the original.
- Paste the prompt, approve the theme first, then one component or page at a time, building after each step.
What to expect from Framer to Tailwind CSS
Framer CSS is generated, so the class names tell you little. Start from the design instead. Ask the assistant to read the rendered pages and propose a token set: colors, font families, a type scale, spacing steps and radii. Review the list, then build the Tailwind theme from it.
With the theme in place, rebuild one section at a time. The assistant reads the rendered markup for a section and writes it with utilities, so the result reads like a hand-built page. Keep the Framer script modules loaded until a section no longer needs them.
Questions the assistant should ask you
- What is the largest number of colors, fonts and spacing steps you want in the theme?
- Should the saved script modules stay loaded while the styling changes?
- Which breakpoints does the live site use at phone, tablet and desktop width?
Verify the result
Run these from the project folder after each batch. The last command lists files that still refer to Framer.
npx @tailwindcss/cli -i ./src/input.css -o ./dist/output.css
# files that still refer to the old platform
grep -rlE "framerusercontent.com" . --include="*.html" --include="*.css" --exclude-dir=node_modules | head- The CSS build finishes with no errors, and hover, focus and breakpoint styles match the live site.
- No page links the old platform stylesheet unless you chose to keep it.
- 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 treats every value as a token and builds a theme with hundreds of entries. Ask for the smallest set that reproduces the design.
- Values set directly on elements can differ slightly from the tokens, so pixel comparison shows small shifts.
- The script modules still run on top of your new classes and can overwrite styles. Test each section with the modules removed and with them loaded.
Frequently asked questions
Why extract tokens before rewriting?
The class names in a Framer export carry no meaning, so a token list is the cleanest way to describe the design and to keep the new theme small.
Does this need a build tool?
Only the Tailwind CLI for CSS. The pages stay plain HTML, and the saved scripts keep working.
Can I use the same tokens in other tools?
Yes. The design tokens prompt writes them to DESIGN.md first, which you can reuse.
Where do I host the result?
Anywhere static. See Framer on Cloudflare Pages for the headers and 404 setup.
Official documentation
Free tools for this job
- Framer Site AnalyzerAnalyze fonts, colors, assets, and page structure of any Framer-published site.
- Framer Site Speed TesterRun performance checks on any Framer-published URL with actionable insights.
- No-Code Asset Path NormalizerRewrite CDN URLs to local relative paths for offline and self-hosted deployments.
- Redirect Map BuilderBuild an old-to-final redirect mapping from URL lists.
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.