┌──────────────────────────────────────────────────────────────────────────────┐ │ Your Framer Project │ │ │ │ Page with layers (not yet components) │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ Navbar │ │ Hero │ │ Features │ │ Pricing │ │ Footer │ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ └──────────────────────────────────┬───────────────────────────────────────────┘ │ Framer Agent creates components │ v ┌──────────────────────────────────────────────────────────────────────────────┐ │ Components panel │ │ ┌──────────────────────┐ ┌──────────────────────┐ ┌────────────────────┐ │ │ │ Section 1 Navbar │ │ Section 2 Hero │ │ Section 3 Features │ │ │ └──────────────────────┘ └──────────────────────┘ └────────────────────┘ │ │ ┌──────────────────────┐ ┌──────────────────────┐ │ │ │ Section 4 Pricing │ │ Section 5 Footer │ │ │ └──────────────────────┘ └──────────────────────┘ │ └──────────────────────────────────┬───────────────────────────────────────────┘ │ React Export Plugin (select Section components) │ v ┌──────────────────────────────────────────────────────────────────────────────┐ │ npx unframer {projectId} --outDir ./src/framer │ │ │ │ src/framer/ │ │ ├── section-1-navbar.jsx │ │ ├── section-2-hero.jsx │ │ ├── section-3-features.jsx │ │ ├── section-4-pricing.jsx │ │ ├── section-5-footer.jsx │ │ ├── chunks/*.js (shared bundled chunks) │ │ └── styles.css (fonts, color variables, base styles) │ └──────────────────────────────────┬───────────────────────────────────────────┘ │ Assemble in your React app │ v ┌──────────────────────────────────────────────────────────────────────────────┐ │ Deployed on Vercel / Cloudflare / Netlify │ └──────────────────────────────────────────────────────────────────────────────┘
123Create a component for each top level layer in the current page. Prefix the component with "Section N" where N is the count of the section in the current page order.
123npm create vite@latest my-website -- --template react-ts cd my-website npm install unframer react@19 react-dom@19
1npx unframer {projectId} --outDir ./src/framer
{projectId} with the short ID shown in the React Export plugin. This creates a src/framer/ directory with all your section components.12345678910111213my-website/ ├── src/ │ ├── framer/ │ │ ├── section-1-navbar.jsx │ │ ├── section-2-hero.jsx │ │ ├── section-3-features.jsx │ │ ├── section-4-pricing.jsx │ │ ├── section-5-footer.jsx │ │ └── styles.css │ ├── App.tsx │ └── main.tsx ├── package.json └── vite.config.ts
styles.css once at the top of your app, then compose your page from the exported components in the same order as your Framer page:12345678910111213141516171819// src/App.tsx import './framer/styles.css' import Section1Navbar from './framer/section-1-navbar' import Section2Hero from './framer/section-2-hero' import Section3Features from './framer/section-3-features' import Section4Pricing from './framer/section-4-pricing' import Section5Footer from './framer/section-5-footer' export default function App() { return ( <div> <Section1Navbar /> <Section2Hero.Responsive /> <Section3Features.Responsive /> <Section4Pricing.Responsive /> <Section5Footer /> </div> ) }
.Responsive for any component that has breakpoint variants (desktop/tablet/mobile). Components without variants can be used directly. The numbered naming makes the ordering obvious at a glance.main.tsx. Remove the <StrictMode> wrapper or Framer animations may break.1npm install react-router react-router-dom
1234567891011121314151617// src/main.tsx import { createRoot } from 'react-dom/client' import { BrowserRouter, Routes, Route } from 'react-router-dom' import './framer/styles.css' import Home from './pages/Home' import About from './pages/About' import Contact from './pages/Contact' createRoot(document.getElementById('root')!).render( <BrowserRouter> <Routes> <Route path="/" element={<Home />} /> <Route path="/about" element={<About />} /> <Route path="/contact" element={<Contact />} /> </Routes> </BrowserRouter> )
1234567891011121314// src/pages/Home.tsx import Section1Navbar from '../framer/section-1-navbar' import Section2Hero from '../framer/section-2-hero' import Section5Footer from '../framer/section-5-footer' export default function Home() { return ( <div> <Section1Navbar /> <Section2Hero.Responsive /> <Section5Footer /> </div> ) }
UnframerProvider:123456789101112// src/main.tsx import { useNavigate } from 'react-router-dom' import { UnframerProvider } from 'unframer' function Providers({ children }: { children: React.ReactNode }) { const navigate = useNavigate() return ( <UnframerProvider navigate={navigate}> {children} </UnframerProvider> ) }
dark class to a parent element:12345<div className={isDarkMode ? 'dark' : ''}> <Section1Navbar /> <Section2Hero.Responsive /> <Section5Footer /> </div>
styles.css already contains both light and dark values for all your --unframer-* CSS variables.12npm install -g vercel vercel
12npm run build npx wrangler pages deploy dist
12npm run build npx netlify deploy --dir=dist --prod
npx unframer {projectId} --outDir ./src/framer--watch flag during development:1npx unframer {projectId} --outDir ./src/framer --watch