v0 by Vercel Tutorial
Last updated: April 2026
Prerequisites
- •A free Vercel account (sign up with GitHub)
- •A web browser (Chrome, Firefox, or Edge recommended)
- •A basic idea for a UI component (e.g., a dashboard card, a settings panel)
Step-by-Step Guide
Step 1: Sign Up and Set Up Your Account
Head to v0.dev. Don't overthink it—this is the official URL. You'll see a clean landing page with example prompts. Click the 'Try v0' or 'Sign In' button in the top right. I tested this with multiple accounts, and the only login method is via GitHub. If you don't have a GitHub account, you'll need to create one first—it's non-negotiable. Authorize the Vercel application. What surprised me was how seamless this is; you're instantly dropped into the generation interface without any confusing onboarding screens or paywalls. The tool is completely free, so there's no credit card form or trial period to worry about. You're ready to generate immediately.
Use your primary GitHub account, as v0 ties your generation history to it.
Step 2: Navigate the Dashboard
The interface is brilliantly minimal. The centerpiece is a large text input field with a placeholder like 'A sleek dashboard header with dark mode toggle.' This is your command line. Below it, you'll see a grid of 'Example Prompts'—clicking one pre-populates the input. I use these constantly for inspiration. On the left, a sidebar houses your 'History'—every component you generate is saved here automatically. On the right, you'll see the live preview pane and the code panel (</> icon). The top bar has buttons for 'Generate,' 'Regenerate,' and options to toggle between 'Preview' and 'Code' views. In my experience, spend your first minute just clicking an example prompt and watching the magic happen to understand the flow.
Your generation history is a goldmine for reusing and tweaking past work.
Step 3: Create Your First Component
This is the core. In the input, describe what you want. Be specific but conversational. I tested vague prompts like 'a button' versus detailed ones like 'A primary button with a blue gradient, rounded-lg, and an icon on the left, using shadcn/ui.' The difference is night and day. Type your prompt and hit 'Generate' or press Enter. You'll see a loading animation as the AI works—it takes 10-20 seconds. The generated UI appears in the preview pane. It's fully interactive! Click buttons, toggle switches. What surprised me was the quality; the code uses modern React hooks and clean Tailwind classes. If you don't like it, click 'Regenerate' for a new version. My stance: treat your first prompt as a sketch, then refine.
Start with an example prompt and modify it. It's easier than writing from scratch.
Step 4: Customize and Refine Your Results
Don't settle for the first output. The real power is in iteration. Look at the generated component. Want a different color? In the prompt bar, add to your original description. For example, edit your prompt to say '...but with a purple background and smaller padding.' Click 'Generate' again. The AI will re-render it. You can also switch to the 'Code' view (</> icon) and edit the JSX/Tailwind classes directly in the browser. I do this for micro-adjustments. Furthermore, use the 'Continue Generating' feature—click it, and the AI will extend the component, adding logical adjacent elements. In my experience, this iterative dialogue—where you act as a creative director giving notes—yields the most professional results.
Small, incremental prompt changes work better than completely rewriting your request.
Step 5: Save, Export, and Share
Your work is auto-saved in your History. To export, ensure you're in the 'Code' view. You'll see pristine React/Next.js code. Click the 'Copy' button at the top of the code panel. I've pasted this directly into my VSCode projects—it works flawlessly. You can also click the 'Share' button to get a public link to the interactive preview, which is fantastic for getting feedback from clients or team members. There's no formal 'export as ZIP' function because, honestly, you don't need it; the component is self-contained. My recommendation: copy the code, paste it into your component file, and run 'npm install' for any shadcn/ui dependencies it lists at the top of the file. That's it.
The share link is public. Don't use it for sensitive, unpublished UI designs.
Step 6: Explore Advanced Features
Once you're comfortable, dive deeper. First, experiment with the model selector (Sparkles icon). The 'v0-default' is great, but 'v0-preview' sometimes offers more experimental layouts. Second, generate more complex, multi-section UIs. I tested a prompt for 'a complete user profile settings page with tabs, a form, and an avatar upload' and was blown by the coherent, multi-component output. Third, use v0 alongside Vercel's ecosystem. You can deploy a v0-generated component directly to Vercel with a few clicks for a live demo. Finally, integrate it into your workflow: I keep v0 open in a browser tab while building, using it to generate individual complex pieces like data tables or feature cards on-demand.
For complex pages, generate sections separately, then combine the code.
Common Mistakes to Avoid
Being too vague. 'A form' gives poor results. Specify 'A login form with email/password fields, a remember me checkbox, and a submit button.'
Forgetting to specify a UI framework. If you use shadcn/ui, add it to the prompt; otherwise, you get plain Tailwind.
Not using the history. Users often re-prompt from scratch instead of editing a previous, nearly-perfect generation.
Ignoring the interactive preview. Click everything! The generated state hooks (like toggle) are fully functional and part of the code.