Quick Start
This guide will walk you through adding your first Gaia UI component to a Next.js application. We’ll build a simple chat interface using the Composer and Message Bubble components.What We’ll Build
By the end of this tutorial, you’ll have a working chat interface with:- A message input with file upload support
- Message bubbles that look like iMessage
- Slash commands for AI tools
- Dark mode support
Step-by-Step Tutorial
Create a Next.js project
If you don’t already have a Next.js project, create one:When prompted:
- Choose Yes for TypeScript
- Choose Yes for Tailwind CSS
- Choose Yes for App Router
Install shadcn/ui base components
Initialize shadcn/ui in your project:When prompted, choose the New York style for consistency with Gaia UI.Then install the base components we’ll need:
Add Gaia UI components
Now let’s add the Composer and Message Bubble components:This will install the components and all their dependencies including:
file-preview- For file uploadsslash-command-dropdown- For AI tool selectionicons- Hugeicons icon set
Run your app
What’s Next?
Add More Components
Explore other Gaia UI components to enhance your chat interface:Customize Styling
All components accept aclassName prop for custom styling:
Add Real AI Integration
Connect the Composer to a real AI service like OpenAI, Anthropic, or your custom backend:Display Tool Calls
Use the Tool Calls Section component to show AI tool usage:Handle File Uploads
The Composer component already supports file uploads. Access them in the submit handler:Learn More
- Browse the Components tab - Explore the full component library
- View source code - See how components are built
- Join Discord - Get help from the community
Need Help?
If you run into issues:- Check the installation guide for troubleshooting tips
- Search GitHub issues
- Ask in our Discord community
- Review component documentation for specific usage examples