v0 + shadcn/ui: Build 5 Production Components (With Full Code)
- v0 generates shadcn/ui components from prompts β the output is 70% complete, not production-ready
- Every data-fetching component needs three states: loading (skeleton), empty (CTA), error (retry) β v0 generates none
- Use typed props instead of v0's hardcoded data β define interfaces matching your API contract
- v0 generates shadcn/ui components from natural language prompts β the output uses Tailwind utilities and CSS variables
- Always review v0 output: it scaffolds structure but misses accessibility, error states, and edge cases
- 5 components built: data table, multi-step form wizard, dashboard cards, command palette, notification system
- Each component follows the same workflow: prompt v0 β review output β add production concerns β integrate with your theme
- v0 output is starting code, not shipping code β treat it like a senior engineer's first draft
Component import fails at build time
ls components/ui/ | grep [component-name]npx shadcn@latest add [component-name] --overwriteStyles look different from v0 preview
grep -A 30 ':root' app/globals.cssgrep -A 30 '.dark' app/globals.cssTypeScript errors on v0-generated props
npx tsc --noEmit 2>&1 | grep [filename]cat components/[path] | grep 'interface\|type'Accessibility audit fails on v0 components
npx @axe-core/cli http://localhost:3000/[page]npx lighthouse http://localhost:3000/[page] --only-categories=accessibilityProduction Incident
Production Debug GuideDiagnose issues with v0-generated components in production
v0 by Vercel generates React components from natural language prompts. The output uses shadcn/ui primitives and Tailwind utilities β which means every component it generates is compatible with your existing design tokens and CSS variables.
The problem: v0 output looks polished but ships broken. Missing aria attributes, no loading states, hardcoded values, no error boundaries. Engineers copy-paste v0 output and deploy it. Three weeks later, they are debugging layout shifts, accessibility failures, and state management bugs that v0 never addressed.
This article builds 5 components end-to-end. Each one starts with a real v0 prompt, reviews the generated output, then adds the production layer: accessibility, error handling, keyboard navigation, and theme integration. The pattern is the same every time β v0 scaffolds, you engineer.
Comparison: v0 Output vs Production-Ready Component (see full table below)
Component 1: Sortable, Filterable Data Table
Real v0 prompt used:
"Build a sortable, filterable data table using shadcn/ui Table and TanStack Table. Columns: customer (string, sortable), amount (currency), status (badge: paid/pending/overdue), date. Add search filter on customer. Use TypeScript. Include loading, empty, and error states."
Data tables are the most requested v0 component and the most commonly shipped broken. v0 generates a table with sample data, column headers, and basic styling. It does not add loading states, empty states, error handling, or server-side pagination.
After v0 generates the table, you add the production layer: TanStack Table for client-side sorting and filtering, Skeleton components for loading states, an empty state card with a CTA, and row selection with bulk actions.
// ============================================ // Production Data Table β v0 scaffold + engineering layer // ============================================ 'use client' import { useState } from 'react' import { useDebouncedCallback } from 'use-debounce' import { ColumnDef, flexRender, getCoreRowModel, getSortedRowModel, getFilteredRowModel, SortingState, ColumnFiltersState, useReactTable, } from '@tanstack/react-table' import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '@/components/ui/table' import { Input } from '@/components/ui/input' import { Button } from '@/components/ui/button' import { Skeleton } from '@/components/ui/skeleton' import { Card, CardContent } from '@/components/ui/card' import { ArrowUpDown, Search, RefreshCw } from 'lucide-react' import { cn } from '@/lib/utils' interface Invoice { id: string customer: string amount: number status: 'paid' | 'pending' | 'overdue' date: string } const columns: ColumnDef<Invoice>[] = [ { accessorKey: 'customer', header: ({ column }) => ( <Button variant="ghost" onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')} > Customer <ArrowUpDown className="ml-2 h-4 w-4" /> </Button> ), cell: ({ row }) => row.getValue('customer'), }, { accessorKey: 'amount', header: 'Amount', cell: ({ row }) => { const amount = parseFloat(row.getValue('amount')) return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(amount) }, }, { accessorKey: 'status', header: 'Status', cell: ({ row }) => { const status = row.getValue('status') as string return ( <span className={cn('inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium', status === 'paid' && 'bg-emerald-100 text-emerald-800 dark:bg-emerald-900 dark:text-emerald-200', status === 'pending' && 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200', status === 'overdue' && 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200' )}> {status} </span> ) }, }, { accessorKey: 'date', header: 'Date' } ] function TableSkeleton() { return ( <div className="rounded-md border"> <Table> <TableHeader> <TableRow> <TableHead>Customer</TableHead> <TableHead>Amount</TableHead> <TableHead>Status</TableHead> <TableHead>Date</TableHead> </TableRow> </TableHeader> <TableBody> {Array.from({ length: 5 }).map((_, i) => ( <TableRow key={i}> <TableCell><Skeleton className="h-4 w-[180px]" /></TableCell> <TableCell><Skeleton className="h-4 w-20" /></TableCell> <TableCell><Skeleton className="h-4 w-16" /></TableCell> <TableCell><Skeleton className="h-4 w-24" /></TableCell> </TableRow> ))} </TableBody> </Table> </div> ) } function EmptyState({ onReset }: { onReset: () => void }) { return ( <Card className="flex flex-col items-center justify-center py-12"> <CardContent className="text-center"> <p className="text-muted-foreground">No invoices found</p> <Button variant="outline" className="mt-4" onClick={onReset}>Clear filters</Button> </CardContent> </Card> ) } function ErrorState({ onRetry }: { onRetry: () => void }) { return ( <Card className="flex flex-col items-center justify-center py-12"> <CardContent className="text-center"> <p className="text-destructive">Failed to load invoices</p> <Button variant="outline" className="mt-4" onClick={onRetry}> <RefreshCw className="mr-2 h-4 w-4" />Retry </Button> </CardContent> </Card> ) } interface DataTableProps { data: Invoice[] isLoading: boolean isError: boolean onRetry: () => void } export function DataTable({ data, isLoading, isError, onRetry }: DataTableProps) { const [sorting, setSorting] = useState<SortingState>([]) const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]) const debouncedFilter = useDebouncedCallback((value: string) => { table.getColumn('customer')?.setFilterValue(value) }, 300) const table = useReactTable({ data, columns, getCoreRowModel: getCoreRowModel(), getSortedRowModel: getSortedRowModel(), getFilteredRowModel: getFilteredRowModel(), onSortingChange: setSorting, onColumnFiltersChange: setColumnFilters, state: { sorting, columnFilters }, }) if (isLoading) return <TableSkeleton /> if (isError) return <ErrorState onRetry={onRetry} /> if (data.length === 0) return <EmptyState onReset={() => setColumnFilters([])} /> return ( <div className="space-y-4"> <div className="flex items-center gap-2"> <Search className="h-4 w-4 text-muted-foreground" /> <Input placeholder="Filter by customer..." onChange={(e) => debouncedFilter(e.target.value)} className="max-w-sm" /> </div> <div className="rounded-md border"> <Table> <TableHeader> {table.getHeaderGroups().map((headerGroup) => ( <TableRow key={headerGroup.id}> {headerGroup.headers.map((header) => ( <TableHead key={header.id} aria-sort={header.column.getIsSorted() === 'asc' ? 'ascending' : header.column.getIsSorted() === 'desc' ? 'descending' : 'none'} > {flexRender(header.column.columnDef.header, header.getContext())} </TableHead> ))} </TableRow> ))} </TableHeader> <TableBody> {table.getRowModel().rows.map((row) => ( <TableRow key={row.id}> {row.getVisibleCells().map((cell) => ( <TableCell key={cell.id}> {flexRender(cell.column.columnDef.cell, cell.getContext())} </TableCell> ))} </TableRow> ))} </TableBody> </Table> </div> </div> ) }
- Prompt v0 with your exact data shape, column names, and interaction model β vague prompts produce generic tables
- After generation, add TanStack Table for sorting/filtering β v0's inline sorting logic does not scale
- Add Skeleton, EmptyState, and ErrorState components β v0 assumes data is always available
- Replace sample data with your API response type β verify column accessor keys match object keys
- Test on throttled network (3G) before shipping β loading and empty states are invisible on fast connections
Component 2: Multi-Step Form Wizard
Real v0 prompt used:
"Build a multi-step onboarding wizard using shadcn/ui. Steps: Personal Info (firstName, lastName, email), Organization (company, role, teamSize), Plan Selection (plan, billingCycle). Use react-hook-form + Zod. Show step indicators with progress. Include a review step before submit."
Form wizards are where v0 output diverges most from production requirements. v0 generates a multi-step form with step indicators, next/back buttons, and basic styling. It does not add per-step validation, step-level error handling, form state persistence across steps, or accessibility for screen readers navigating between steps.
After generation, add per-step zod schemas that validate before advancing, form state persistence, a summary/review step, and aria-live announcements.
// ============================================ // Multi-Step Form Wizard β FIXED with useFormContext // ============================================ 'use client' import { useState } from 'react' import { useForm, FormProvider, useFormContext } from 'react-hook-form' import { zodResolver } from '@hookform/resolvers/zod' import { z } from 'zod' import { Button } from '@/components/ui/button' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { cn } from '@/lib/utils' import { Check } from 'lucide-react' // Per-step schemas const step1Schema = z.object({ firstName: z.string().min(1, 'First name is required'), lastName: z.string().min(1, 'Last name is required'), email: z.string().email('Valid email is required') }) const step2Schema = z.object({ company: z.string().min(1, 'Company is required'), role: z.string().min(1, 'Role is required'), teamSize: z.string().min(1, 'Team size is required') }) const step3Schema = z.object({ plan: z.enum(['starter', 'pro', 'enterprise']), billingCycle: z.enum(['monthly', 'annual']) }) const fullSchema = step1Schema.merge(step2Schema).merge(step3Schema) type FormData = z.infer<typeof fullSchema> const steps = [ { label: 'Personal', schema: step1Schema }, { label: 'Organization', schema: step2Schema }, { label: 'Plan', schema: step3Schema }, { label: 'Review', schema: z.object({}) } ] function StepPersonal() { const { register, formState: { errors } } = useFormContext<FormData>() return ( <div className="space-y-4"> <div className="grid grid-cols-2 gap-4"> <div className="space-y-2"> <Label htmlFor="firstName">First name</Label> <Input id="firstName" {...register('firstName')} /> {errors.firstName && <p className="text-sm text-destructive">{errors.firstName.message}</p>} </div> <div className="space-y-2"> <Label htmlFor="lastName">Last name</Label> <Input id="lastName" {...register('lastName')} /> {errors.lastName && <p className="text-sm text-destructive">{errors.lastName.message}</p>} </div> </div> <div className="space-y-2"> <Label htmlFor="email">Email</Label> <Input id="email" type="email" {...register('email')} /> {errors.email && <p className="text-sm text-destructive">{errors.email.message}</p>} </div> </div> ) } // StepOrganization, StepPlan, and StepReview follow the same pattern with useFormContext + error display (omitted for brevity but identical structure) function StepReview({ data }: { data: FormData }) { return ( <div className="space-y-4"> <h3 className="text-lg font-semibold">Review your information</h3> <dl className="grid grid-cols-2 gap-2 text-sm"> <dt className="text-muted-foreground">Name</dt><dd>{data.firstName} {data.lastName}</dd> <dt className="text-muted-foreground">Email</dt><dd>{data.email}</dd> <dt className="text-muted-foreground">Company</dt><dd>{data.company}</dd> <dt className="text-muted-foreground">Plan</dt><dd>{data.plan} ({data.billingCycle})</dd> </dl> </div> ) } export function OnboardingWizard() { const [step, setStep] = useState(0) const methods = useForm<FormData>({ resolver: zodResolver(fullSchema), defaultValues: { firstName: '', lastName: '', email: '', company: '', role: '', teamSize: '', plan: 'starter', billingCycle: 'monthly' } }) const { handleSubmit, trigger, getValues } = methods const stepFields = { 0: ['firstName','lastName','email'] as const, 1: ['company','role','teamSize'] as const, 2: ['plan','billingCycle'] as const } as const async function nextStep() { const isValid = await trigger(stepFields[step as keyof typeof stepFields]) if (isValid) setStep((s) => Math.min(s + 1, steps.length - 1)) } function prevStep() { setStep((s) => Math.max(s - 1, 0)) } const onSubmit = async (data: FormData) => { console.log('Submitting:', data) } return ( <FormProvider {...methods}> <Card className="mx-auto max-w-lg"> <CardHeader> <CardTitle>Get started</CardTitle> <StepIndicator current={step} total={steps.length} /> </CardHeader> <CardContent> <div aria-live="polite" className="sr-only">Step {step + 1} of {steps.length}: {steps[step].label}</div> <form onSubmit={handleSubmit(onSubmit)}> {step === 0 && <StepPersonal />} {step === 1 && <StepOrganization />} {step === 2 && <StepPlan />} {step === 3 && <StepReview data={getValues()} />} <div className="mt-6 flex justify-between"> <Button type="button" variant="outline" onClick={prevStep} disabled={step === 0}>Back</Button> {step < steps.length - 1 ? ( <Button type="button" onClick={nextStep}>Continue</Button> ) : ( <Button type="submit">Submit</Button> )} </div> </form> </CardContent> </Card> </FormProvider> ) }
Component 3: Analytics Dashboard Cards
Real v0 prompt used:
"Create 4 analytics dashboard metric cards using shadcn/ui Card. Show revenue, subscriptions, active users, orders with trend indicators and icons. Make it responsive. Include loading skeleton for each card."
Dashboard cards are v0's strongest output. The generated cards look polished with gradients, icons, and trend indicators. But v0 hardcodes the data.
After generation, add a data-fetching hook, real-time updates, responsive grid, and independent skeletons to prevent CLS.
// ============================================ // Analytics Dashboard Cards β v0 scaffold + data layer // ============================================ 'use client' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Skeleton } from '@/components/ui/skeleton' import { cn } from '@/lib/utils' import { TrendingUp, TrendingDown, Users, DollarSign, ShoppingCart, Activity } from 'lucide-react' interface MetricCard { title: string value: string | number change: number changeLabel: string icon: React.ComponentType<{ className?: string }> } interface DashboardCardsProps { metrics: MetricCard[] isLoading: boolean } function MetricCard({ metric }: { metric: MetricCard }) { const isPositive = metric.change >= 0 const TrendIcon = isPositive ? TrendingUp : TrendingDown return ( <Card> <CardHeader className="flex flex-row items-center justify-between pb-2"> <CardTitle className="text-sm font-medium text-muted-foreground">{metric.title}</CardTitle> <metric.icon className="h-4 w-4 text-muted-foreground" /> </CardHeader> <CardContent> <div className="text-2xl font-bold">{metric.value}</div> <p className="mt-1 flex items-center gap-1 text-xs"> <TrendIcon className={cn('h-3 w-3', isPositive ? 'text-emerald-600' : 'text-red-600')} /> <span className={cn(isPositive ? 'text-emerald-600' : 'text-red-600')}>{isPositive ? '+' : ''}{metric.change}%</span> <span className="text-muted-foreground">{metric.changeLabel}</span> </p> </CardContent> </Card> ) } function MetricCardSkeleton() { return ( <Card> <CardHeader className="flex flex-row items-center justify-between pb-2"> <Skeleton className="h-4 w-24" /> <Skeleton className="h-4 w-4" /> </CardHeader> <CardContent> <Skeleton className="h-8 w-32" /> <Skeleton className="mt-2 h-3 w-20" /> </CardContent> </Card> ) } export function DashboardCards({ metrics, isLoading }: DashboardCardsProps) { if (isLoading) { return ( <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4"> {Array.from({ length: 4 }).map((_, i) => <MetricCardSkeleton key={i} />)} </div> ) } return ( <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4"> {metrics.map((metric) => <MetricCard key={metric.title} metric={metric} />)} </div> ) }
- v0 hardcodes metric values β replace with typed props that accept your API response
- Add a data-fetching hook (SWR or React Query) with a loading state β each card skeleton loads independently
- Real-time updates: poll every 30s or use WebSocket β v0 assumes static data
- Responsive grid: sm:grid-cols-2 lg:grid-cols-4 β v0 often generates a fixed 4-column layout that breaks on mobile
Component 4: Command Palette
Real v0 prompt used:
"Build a Cmd+K command palette using shadcn/ui Command and cmdk. Include recent commands, grouped sections (Navigation, Actions), icons, and global keyboard shortcut."
Command palettes (Cmd+K) are a power-user feature that v0 can scaffold. The generated component includes a search input, a results list, and keyboard navigation basics. But v0 misses fuzzy search integration, recent commands persistence, grouped results with section headers, and proper focus management.
// ============================================ // Command Palette β v0 scaffold + cmdk integration // ============================================ 'use client' import { useEffect, useState } from 'react' import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/components/ui/command' import { useRouter } from 'next/navigation' import { File, Search, Settings, Users, LayoutDashboard, CreditCard } from 'lucide-react' interface CommandAction { id: string label: string icon: React.ComponentType<{ className?: string }> action: () => void category: string keywords?: string[] } const RECENT_KEY = 'command-palette-recent' function getRecentCommands(): string[] { if (typeof window === 'undefined') return [] try { return JSON.parse(localStorage.getItem(RECENT_KEY) ?? '[]') } catch { return [] } } function addRecentCommand(id: string) { const recent = getRecentCommands().filter((r) => r !== id) recent.unshift(id) localStorage.setItem(RECENT_KEY, JSON.stringify(recent.slice(0, 5))) } export function CommandPalette() { const [open, setOpen] = useState(false) const router = useRouter() useEffect(() => { function handleKeyDown(e: KeyboardEvent) { if (e.key === 'k' && (e.metaKey || e.ctrlKey)) { e.preventDefault(); setOpen((prev) => !prev) } } document.addEventListener('keydown', handleKeyDown) return () => document.removeEventListener('keydown', handleKeyDown) }, []) const commands: CommandAction[] = [ /* same as previous version */ ] function runCommand(command: CommandAction) { addRecentCommand(command.id) command.action() setOpen(false) } const recentIds = getRecentCommands() const recentCommands = commands.filter((c) => recentIds.includes(c.id)) return ( <CommandDialog open={open} onOpenChange={setOpen}> <CommandInput placeholder="Type a command or search..." /> <CommandList> <CommandEmpty>No results found.</CommandEmpty> {recentCommands.length > 0 && ( <CommandGroup heading="Recent"> {recentCommands.map((command) => ( <CommandItem key={command.id} onSelect={() => runCommand(command)}> <command.icon className="mr-2 h-4 w-4" />{command.label} </CommandItem> ))} </CommandGroup> )} {['Navigation', 'Actions'].map((category) => { const groupCommands = commands.filter((c) => c.category === category) return ( <CommandGroup key={category} heading={category}> {groupCommands.map((command) => ( <CommandItem key={command.id} keywords={command.keywords} onSelect={() => runCommand(command)}> <command.icon className="mr-2 h-4 w-4" />{command.label} </CommandItem> ))} </CommandGroup> ) })} </CommandList> </CommandDialog> ) }
- v0 generates a basic search list β use cmdk library for proper keyboard navigation, grouping, and fuzzy matching
- Recent commands: persist to localStorage, show as a separate group at the top β v0 never adds this
- Global shortcut (Cmd+K): v0 generates the listener but forgets cleanup β add return statement in useEffect
- Grouped results with section headers improve scanability β group by Navigation, Actions, Settings
Component 5: Notification Toast System
Real v0 prompt used:
"Create a toast notification system using sonner and shadcn/ui styling. Support success, error, warning, info, action buttons, and promise toasts."
Toast notifications are deceptively complex. v0 generates a single toast component with success/error variants and a dismiss button. It does not generate a toast queue manager that handles stacking and deduplication, auto-dismiss with pause-on-hover, action buttons within toasts, or a toast provider that wraps the app.
// ============================================ // Notification Toast System β v0 scaffold + sonner // ============================================ // Provider in app/layout.tsx import { Toaster } from '@/components/ui/sonner' // <Toaster position="top-right" richColors closeButton /> // Toast utility in lib/toast.ts import { toast } from 'sonner' export const notify = { success({ title, description, action, duration = 4000 }: ToastOptions) { toast.success(title, { description, duration, action: action ? { label: action.label, onClick: action.onClick } : undefined }) }, error({ title, description, action, duration = 6000 }: ToastOptions) { toast.error(title, { description, duration, action: action ? { label: action.label, onClick: action.onClick } : undefined }) }, // warning, info, promise methods unchanged } // Usage example (in any component) // notify.success({ title: 'Invoice sent', description: 'The invoice was emailed to the customer.', action: { label: 'Undo', onClick: () => undoSend() } }) // notify.promise(saveInvoice(data), { loading: 'Saving invoice...', success: 'Invoice saved successfully', error: (err) => `Failed to save: ${err.message}` })
- v0 generates a single toast component β use sonner for stacking, deduplication, and auto-dismiss
- Create a notify utility with typed methods (success, error, warning, info) β enforces consistent API
- Auto-dismiss durations should vary by severity β errors stay longer (6s) than success (4s)
- Promise-based toasts (notify.promise) show loading β success/error automatically β ideal for API calls
- Always add a Toaster provider at the app root β v0 generates the toast but forgets the provider
| Concern | v0 Generates | You Must Add |
|---|---|---|
| Loading state | No β assumes data is available | Skeleton components per element |
| Empty state | No β renders empty container | Illustration + CTA when data is empty |
| Error state | No β crashes silently | Error card with retry button |
| Accessibility | Basic β missing aria-live, focus management | aria-live for dynamic content, focus trapping |
| Keyboard navigation | Partial β Radix handles basics | Custom shortcuts, focus return on close |
| Validation | On submit only | Per-step validation, real-time feedback |
| Data fetching | None β hardcoded sample data | SWR/React Query with typed props |
| Responsive layout | Sometimes β often fixed columns | sm:/md:/lg: breakpoints, container queries |
| Theme integration | Partial β uses shadcn/ui tokens | Verify CSS variables match your design system |
| State persistence | None | localStorage for preferences, recent items |
π― Key Takeaways
- v0 generates shadcn/ui components from prompts β the output is 70% complete, not production-ready
- Every data-fetching component needs three states: loading (skeleton), empty (CTA), error (retry) β v0 generates none
- Use typed props instead of v0's hardcoded data β define interfaces matching your API contract
- Add per-step validation to v0 form wizards β v0 validates on submit only
- Use sonner for toast systems and cmdk for command palettes β v0 generates basic versions without queue management or fuzzy search
- Run accessibility audits on every v0 component β missing aria-live, focus management, and keyboard navigation are common gaps
- Test v0 components on throttled network (3G) before shipping
β Common Mistakes to Avoid
Interview Questions on This Topic
- QWhat is the recommended workflow when using v0 to generate a production component?JuniorReveal
- QWhy does v0-generated code fail accessibility audits, and how do you fix it?Mid-levelReveal
- QHow do you handle the gap between v0's generated form validation and production requirements?Mid-levelReveal
- QWhat is the difference between v0's output and a production-ready component?SeniorReveal
- QWhen should you use v0 versus writing the component from scratch?SeniorReveal
Frequently Asked Questions
Can I use v0 for free?
v0 has a free tier with ~200 credits per month (roughly 20-30 full component generations as of 2025). The paid plan increases the generation limit and adds project-level context. For production use, the free tier is sufficient for prototyping.
Does v0 work with frameworks other than Next.js?
v0 generates React components using shadcn/ui and Tailwind CSS. The output works with any React framework (Next.js, Remix, Vite + React). However, v0 defaults to Next.js conventions (app router, server components). For other frameworks, you may need to adjust imports.
How do I customize the shadcn/ui theme in v0 output?
v0 uses your project's existing CSS variables. Update the CSS variables in globals.css (under :root and .dark), and v0-generated components will automatically use your theme. Do not override v0's Tailwind classes β update the CSS variables instead.
Can v0 generate server components?
Yes. v0 can generate React Server Components when you specify in the prompt. However, most interactive components require 'use client'.
How do I handle v0 output that uses a shadcn/ui component I have not installed?
Read the import statements in v0's output. Run npx shadcn@latest add [component-name] for each missing primitive.
Developer and founder of TheCodeForge. I built this site because I was tired of tutorials that explain what to type without explaining why it works. Every article here is written to make concepts actually click.