Basic Prompts
Learn how to write effective prompts for v0
Writing Effective Prompts
The key to getting the best results from v0 is writing clear, specific prompts. Here are some guidelines for writing effective prompts:
- Be specific - Clearly describe what you want to build, including functionality, style, and any specific requirements
- Provide context - Explain the purpose of the component or page you're building
- Mention technologies - Specify if you want to use particular libraries or frameworks
- Include examples - Reference existing designs or components if applicable
Prompt Examples
UI Component
Create a product card component with an image, title, price, rating, and add to cart button. The card should have hover effects and be responsive.
Page Layout
Build a landing page for a SaaS product with a hero section, features section, pricing table, testimonials, and a contact form. Use a modern design with gradients and make it fully responsive.
Functionality
Create a form with email and password fields that validates input, shows error messages, and submits data to an API endpoint. Include loading states and success/error notifications.
Prompt Structure
A well-structured prompt typically includes these elements:
- What - Clearly state what you want to build (e.g., "Create a navigation bar")
- Details - Provide specific details about functionality, appearance, and behavior
- Context - Explain where and how this will be used
- Technologies - Specify any required technologies or frameworks
- Constraints - Mention any limitations or requirements
Create a responsive navigation bar for a marketing website. It should include a logo on the left, navigation links in the center (Home, Features, Pricing, Blog, Contact), and a sign-up button on the right. On mobile, it should collapse into a hamburger menu. Use Next.js and Tailwind CSS, and make sure it's accessible.