What does taking v0 to production involve?
Taking v0 to production involves turning generated React and Next.js components into code that fits your app: your tokens, your data layer, your file structure and your accessibility standard. v0 gives you a fast, good-looking draft. The cleanup pass makes it maintainable, testable and safe to change next month.
This guide is about components, not whole apps. If v0 or another AI builder produced your entire product and it's breaking under real users, that's a different job, covered in our guide to vibe code cleanup services. Here we assume you have a working Next.js app and want to bring v0 screens and components into it properly. It's one part of the wider practice in our guide to full-stack product development for startups.
What does v0 generated code usually look like?
v0 generated code is usually React with TypeScript, styled with Tailwind CSS and built on shadcn/ui components. That's a sensible base, because it's the same stack many teams already use. The patterns that need attention come from v0 optimizing for a complete-looking preview rather than for your codebase.
Pattern in generated code | Why it's fine in a preview | Why it hurts in production |
|---|---|---|
Arbitrary Tailwind values and raw hex colors | Matches the prompt exactly | Drifts from your design system and breaks theming |
One large file per screen | Easy to read in one place | Hard to reuse, test or review |
"use client" at the top of everything | Interactivity just works | Ships more JavaScript and blocks server data fetching |
Mock data inlined in the component | Preview shows realistic content | Real data shape differs and types lie |
Divs with click handlers | Looks like a button | Not reachable by keyboard or screen readers |
Duplicated shadcn/ui primitives | Self-contained output | Two slightly different Button components in one repo |
How do you clean up v0 output step by step?
Clean up v0 output in a fixed order: get the code into your repo, align it with your existing components, apply tokens, fix accessibility, rework data fetching, then restructure files. Doing tokens and shared components first means every later fix happens once.
Move the code into a repo you own
Bring the component into your Next.js project through v0's GitHub integration or the install command v0 offers for a generation. v0's export options have changed over time, so check the current v0 docs for the route available on your plan.
Reconcile with your shared components
Delete any shadcn/ui primitives v0 copied that you already have, and import yours instead. One Button, one Input, one Dialog.
Replace hardcoded styles with tokens
Swap raw hex values and arbitrary sizes for your theme's color, spacing, radius and type tokens.
Fix accessibility
Use real buttons and links, label every input, check focus order and states, and test contrast.
Rework data fetching
Remove mock data, define types from your real API or database, and fetch on the server where you can.
Split and organize files
Break the screen into named components, push shared pieces into your component folder and keep route files thin.
Ship it behind review
Open a small pull request per component, with screenshots, and merge it before starting the next.
How do you replace hardcoded styles with design tokens?
Replace hardcoded styles by mapping every raw color, size and radius in the v0 output to an existing token in your Tailwind theme, and adding a token only when the design genuinely needs a new value. The goal is that the component changes when your theme changes, including dark mode.
Search the file for hex codes, arbitrary values in square brackets and color utilities that aren't part of your palette. Most will map cleanly: a near-black heading color becomes your foreground token, a gray border becomes your border token. When v0 picked a value nothing in your system matches, decide whether it's a real new need or noise from the prompt. It's usually noise.
If your tokens start life in Figma, keep that pipeline as the source of truth. Our guide to syncing Figma variables to Tailwind covers the export and transform. Prompting v0 with your token names and component list up front reduces this step, and the comparison in our guide to Figma-to-code AI tools covers how other generators handle design context.
How do you fix accessibility in v0 components?
Fix accessibility in v0 components by checking the four things generated UI most often gets wrong: semantic elements, labels, focus and contrast. shadcn/ui primitives are built on accessible foundations, but custom markup v0 writes around them isn't automatically accessible.
- Semantic elements. Anything clickable that navigates is a link; anything that acts is a button. Replace divs and spans with click handlers.
- Labels. Every input needs a visible label or an accessible name. Icon-only buttons need an aria-label that says what they do.
- Focus. Tab through the component with no mouse. Focus should move in reading order, stay visible and return to a sensible place after a dialog closes.
- Contrast. WCAG 2.2 sets a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text and for UI components such as input borders. Muted gray text on tinted cards is where generated designs most often fall short.
- States. Loading, empty, error and disabled states are often missing from a preview. Add them, and make sure each one is announced or visible.
Run an automated checker, then do a manual keyboard pass. Only a person catches a focus order that makes no sense.
How should data fetching work in cleaned-up v0 components?
In a cleaned-up v0 component, data should be fetched on the server in a Server Component and passed down as props, with "use client" kept for the small interactive pieces. That's the default model of the Next.js App Router, and v0 output often works against it by making the whole screen a Client Component.
Start by deleting the inlined mock data and writing a type for the real data. Then move the fetch into the route's page or a server-side data function, and pass results into presentational components. Interactive parts such as a filter menu or a chart tooltip become small Client Components that receive data rather than fetch it. Mutations go through Server Actions or your API routes, with validation on the server.
This is also where generated code can hide real risk: a fetch to a third-party API from the browser can expose a key. Keep secrets in server-only code and environment variables. The architecture choices behind this are covered in our guide to building a SaaS app with Next.js.
Hypothetical example: cleaning a v0 dashboard card
For example, suppose v0 produced a 300-line revenue dashboard as one Client Component with a hardcoded array of twelve months, three raw hex colors and a div used as a date-range button.
The cleanup splits it into a server-rendered page that fetches the real figures, a typed RevenueCard that only displays them, and a small client-side DateRangePicker built on the existing shadcn/ui Popover. The hex values become chart and foreground tokens, the div becomes a button with a label, and the mock array is replaced by a type matching the database query. The result is more files, but each one is short and testable.
How should you structure files after a v0 Next.js cleanup?
After a v0 Next.js cleanup, route files should stay thin, shared components should live in one components folder, and feature-specific pieces should sit next to the route that uses them. The exact layout matters less than one rule applied everywhere, so the next developer finds things where they expect.
Where | What goes there |
|---|---|
app/(route)/page.tsx | Data fetching and layout for that route only |
app/(route)/_components | Pieces used only by that route |
components/ui | Your shadcn/ui primitives, one copy each |
components/ | Shared composed components used across routes |
lib/ | Data access, validation schemas and helpers |
Name components after what they are in the product (InvoiceTable), not what v0 called them in a generation. Delete unused imports and exports v0 left behind, and keep the generated prompt in the pull request description if it helps reviewers understand intent. Teams that do this work continuously often give it to a design engineer, who can judge both the design and the code.
What should you check before a v0 Vercel deploy?
Before a v0 Vercel deploy, check that the build passes type checking and linting, environment variables are set per environment, the component works with real data, and nothing secret reaches the browser. Deploying a v0 generation straight from the editor is fine for a preview; production should deploy from your repo through review.
- Types and lint pass with no new suppressions added to make the build green.
- Environment variables exist in preview and production, and only public values use the NEXT_PUBLIC_ prefix.
- Real data renders, including empty and error states, and long text doesn't break the layout.
- Mobile and keyboard checks are done on the deployed preview, not just the local machine.
- Images use next/image with sizes set, and fonts load through next/font, so the page stays fast.
- A preview deployment gets a quick review from someone who didn't write the prompt.
If cleanup turns into the main job rather than a step, that's a sign you need dedicated help. Our Next.js development service and design retainer both cover this, and our guide to hiring Next.js developers covers what to look for if you build the team yourself.
