React Components Example
Using v0-sdk React components for streaming UI responses
Explore different design themes and interactive components for rendering real-time AI responses. This showcase demonstrates the full capabilities of @v0-sdk/react
components.
Features
- Multiple Design Themes: Elegant, Minimal, Neobrutalism, Terminal styles
- Streaming Responses: Real-time rendering of AI-generated content
- Interactive Components: Code blocks, thinking sections, task management
- Modern UI: Built with Next.js 15, React 19, and Tailwind CSS
- Responsive Design: Works across different screen sizes and devices
Design Themes
Elegant Theme
A sophisticated design with smooth animations and elegant typography.
Minimal Theme
Clean, distraction-free interface focusing on content clarity.
Neobrutalism Theme
Bold, high-contrast design with sharp edges and vibrant colors.
Terminal Theme
Developer-focused interface mimicking terminal aesthetics.
Streaming Theme
Optimized for real-time streaming content with live updates.
Key Components
StreamingMessage Component
Code Block Component
Thinking Section Component
Getting Started
Prerequisites
- Node.js 22+
- pnpm (recommended) or npm
- v0 API key from v0.dev/chat/settings/keys
Installation
-
Navigate to the react example directory:
-
Install dependencies:
-
Set up environment variables:
-
Run the development server:
-
Open http://localhost:3000 in your browser
Usage Patterns
Basic Streaming
Theme Customization
Custom Styling
Technologies Used
- Frontend Framework: Next.js 15 with App Router
- React Version: React 19
- Styling: Tailwind CSS with custom design systems
- UI Components: Custom components optimized for AI content
- Animations: Framer Motion for smooth interactions
- Code Highlighting: Syntax highlighting for code blocks
Environment Variables
Variable | Description | Required |
---|---|---|
V0_API_KEY | Your v0 API key for authentication | Yes |
Source Code
View the complete source code on GitHub: v0-sdk/examples/v0-sdk-react-example