Back/Design/v0
IntermediateDesignv0

How to Build an On-Brand Component Library in v0 Using Screenshots

Learn to create a custom UI component library in v0 by feeding it screenshots of your product. This ensures all AI-generated prototypes automatically match your brand's visual identity, solving the problem of generic AI designs.

From How I AI

How I AI: Colin Matthews' Workflows for Prototyping with Your Brand's UI

with Claire Vo

How to Build an On-Brand Component Library in v0 Using Screenshots

Tools Used

v0

Vercel AI UI generator

Step-by-Step Guide

1

Use the Master Prompt to Create a Library

Start by instructing the AI to create a *component library* based on a screenshot of your product, rather than a full page. This initial prompt guides the AI to focus on building reusable 'Lego bricks' first.

Prompt:
You are tasked with creating a component library based on a screenshot, using NextJs, React, and Tailwind CSS. All components should be custom-made to match the screenshot as closely as possible. Follow these instructions carefully:

1. Analyze the provided screenshot
2. Identify distinct UI components in the screenshot. These may include, but are not limited to:
   ◦ Buttons
   ◦ Input fields
   ◦ Navigation bars
   ◦ Cards
   ◦ Modals
   ◦ Typography elements
3. For each identified component:
   a. Create a React functional component
   b. Use Tailwind CSS classes to style the component, matching the visual design in the screenshot
   c. Ensure the component is responsive and accessible
   d. Add any necessary props for customization
   e. Include a brief comment describing the component's purpose
4. After creating all individual components, create an index page that imports and displays each component with example usage.

Remember to use only custom-made components and Tailwind CSS classes. Do not use any external libraries or pre-built components. Strive to match the visual design in the screenshot as closely as possible while maintaining good coding practices and component reusability.
2

Iterate with More Screenshots

Feed the AI additional screenshots from different parts of your application. With each new image, use a simple prompt to instruct the AI to identify and add new UI elements to the growing component library.

Prompt:
Please continue adding components.
3

Fork Your Component Library

Once you have a solid component library, use the 'Fork' feature in v0 to create a clean copy of the project. This is crucial for preserving your original library as a reusable asset for future prototypes.

Pro Tip: Never work directly on your master component library. Always fork it first to ensure you have a clean, reusable starting point for any new project.
4

Assemble a Page from Your Components

In your newly forked project, ask the AI to build a full page or view. Because you've pre-built the on-brand components, the AI will use them to assemble a high-fidelity prototype that matches your product's look and feel.

Prompt:
create a homepage for Airbnb

Become a 10x PM.
For just $5 / month.

We've made ChatPRD affordable so everyone from engineers to founders to Chief Product Officers can benefit from an AI PM.