Prompt to convert a Webflow export to Tailwind CSS
This prompt asks an AI coding assistant to convert the CSS of a WebExport copy of a Webflow site to Tailwind utility classes, page by page, while keeping the HTML pages. It moves colors, fonts and radii into a Tailwind theme, keeps Webflow component classes until their scripts are replaced, and deletes rules only after a page matches.
Last reviewed
Key facts
- Tailwind’s current docs describe a CLI route: install tailwindcss and @tailwindcss/cli, then run npx @tailwindcss/cli.
- Theme values live in an @theme block in CSS, such as --color-* and --font-*.
- Webflow component classes such as w-nav and w-dropdown are driven by webflow.js.
- Test status: Tailwind CSS steps tested on a real export (Tailwind CSS 4.3.5), Webflow 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 Webflow site to Tailwind CSS.
CONTEXT
- ./exported-site is a WebExport download of my Webflow 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.
WEBFLOW-SPECIFIC CLEANUP
- Keep webflow.js and the data-w-id attributes until each interaction has been rebuilt. List every interaction first and ask me whether to keep or rebuild it.
- Keep classes with a w- prefix (w-nav, w-dropdown, w-tab, w-slider, w-form). Webflow scripts control them.
- Forms: keep the fields and labels, set the action to [FORM_ENDPOINT], and report any form you could not convert.
- Search for website-files.com in HTML, CSS, inline styles and Lottie data-src values. 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 Webflow to Tailwind CSS
This is the lightest conversion, because the HTML stays. The assistant builds a theme from the values already in the Webflow CSS, such as brand colors, fonts, radii and spacing steps, then rewrites each page’s classes to utilities and removes the old rules once nothing uses them. You keep the site static and add a build step for CSS only.
Work in order of reuse. Convert the navbar and footer first, because they appear on every page, then buttons and cards, then one page at a time. After each step, build the CSS and compare the page with the live site, so a mismatch is caught while it is small.
Questions the assistant should ask you
- Which colors and fonts in the Webflow stylesheet are real brand values, and which are leftovers?
- Should the w- component styles be rewritten now or kept until their scripts go?
- Is a build step for CSS acceptable on your host?
Verify the result
Run these from the project folder after each batch. The last command lists files that still refer to Webflow.
npx @tailwindcss/cli -i ./src/input.css -o ./dist/output.css
# files that still refer to the old platform
grep -rlE "website-files.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.
- Submit each form once and confirm the message arrives where you expect.
- Scroll every page with the console open and confirm no animation script returns 404.
What can go wrong
- Deleting Webflow’s w- classes breaks components that webflow.js controls. Keep them until the interaction is rebuilt.
- Utilities replace values but not media-query logic, so a section that changes at a breakpoint needs the matching responsive classes.
- The old stylesheet and the new one both load, and rules fight each other. Remove old rules only after the page matches.
Frequently asked questions
Do I need a framework to use Tailwind on the export?
No. The Tailwind CLI reads your HTML files and writes one CSS file, so the site stays plain static pages.
Will the site look identical afterwards?
It should, but compare every page. Webflow CSS has many small rules that are easy to miss, so check hover states and breakpoints.
Can I keep Webflow interactions?
Yes, by keeping webflow.js and the data attributes it reads. The prompt lists them for you.
How do I find unused CSS afterwards?
Search the old stylesheet for each class name in your pages. The Webflow Code Cleanliness Audit also flags bloated scripts and attributes.
Official documentation
Free tools for this job
- Webflow Code Cleanliness AuditAudit Webflow HTML for bloated interaction scripts, proprietary attributes, and form locks.
- Webflow → Vercel Migration ChecklistInteractive step-by-step checklist for migrating your site off Webflow hosting.
- 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 Webflow 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.