Quick Start
- Fork the repository on GitHub
- Clone your fork locally
- Create a new branch for your changes
- Make your changes
- Test locally
- Submit a pull request
Development Setup
Prerequisites
- Node.js 20 or later
- pnpm (recommended package manager)
- Git
Installation
Development Commands
Project Structure
Contributing Components
Our Philosophy
Quality Over Quantity - We focus on shipping production-ready components that solve real problems. Each component should be:- Battle-tested in production scenarios
- Designed to handle edge cases and real-world scenarios
- Accessible, responsive, and performant
- Solving problems better than existing alternatives
Component Requirements
Before submitting a component, ensure it meets these requirements:- Works in light and dark mode
- Fully keyboard accessible
- Has proper ARIA labels and semantic HTML
- Respects reduced motion preferences
- Uses CSS variables for theming (no hardcoded colors)
- Follows the Gaia UI design philosophy (flat design, proper spacing)
- Includes TypeScript types
- Has comprehensive documentation
- Includes preview examples
Workflow
import * as React from "react";
import { cn } from "@/lib/utils";
export interface YourComponentProps {
className?: string;
children?: React.ReactNode;
}
const YourComponent = React.forwardRef<HTMLDivElement, YourComponentProps>(
({ className, children, ...props }, ref) => {
return (
<div ref={ref} className={cn("base-classes", className)} {...props}>
{children}
</div>
);
}
);
YourComponent.displayName = "YourComponent";
export { YourComponent };
{
"name": "your-component",
"type": "registry:ui",
"title": "Your Component",
"description": "A brief description of what this component does.",
"dependencies": [],
"registryDependencies": ["icons"],
"files": [
{
"path": "registry/new-york/ui/your-component.tsx",
"type": "registry:ui"
}
]
}
import { YourComponent } from "@/registry/new-york/ui/your-component";
export default function YourComponentDefault() {
return (
<YourComponent>
Example content
</YourComponent>
);
}
Design Guidelines
Gaia UI follows Apple’s Human Interface Guidelines and modern design principles.Flat Design, No Outlines
Avoid heavy borders and outlines:Spacing Guidelines
- Touch targets: Minimum 44x44px
- Padding scale:
p-3,p-4,p-6,p-8 - Consistent gaps:
gap-3orgap-4for layouts,gap-6orgap-8for sections
Typography
- Headings: Weights 500-700
- Body text: 14-16px, weight 400
- Labels: 12-14px, weight 500
- Stick to 2-3 sizes per component max
Theme Colors
Always use CSS variables:Accessibility Requirements
Keyboard Navigation
- Be focusable
- Have logical tab order
- Show visible focus indicators
- Support Enter and Space for activation
Screen Reader Support
Motion Preferences
Built With
- Next.js 15 - Documentation and registry
- Tailwind CSS v4 - Styling
- TypeScript - Type safety
- Radix UI - Accessible primitives
- Framer Motion - Animations
- shadcn CLI - Component installation
Migration from HeroUI
When migrating components from the main Gaia repo:Pull Request Guidelines
Before Submitting
- Test in both light and dark modes
- Run type checking:
pnpm run type - Run linting:
pnpm run lint:fix - Format code:
pnpm run format - Test keyboard navigation
- Verify responsive behavior
- Check accessibility with screen reader
PR Description
Include:- What component/feature you’re adding
- Why it’s needed
- Screenshots or GIFs of the component
- Any breaking changes
- Checklist of completed requirements
Example PR Template
Code Style
We use Biome for linting and formatting:Testing Components
Before submitting:- Visual check - Both themes, responsive breakpoints
- Keyboard test - Tab through all interactive elements
- Screen reader test - Use NVDA/JAWS/VoiceOver
- Responsive test - Mobile, tablet, desktop
- Edge cases - Empty states, long text, many items
Getting Help
- Discord - Join our community
- GitHub Issues - Report bugs or request features
- Twitter - @trygaia