Overview
The UI system provides:- 55+ Components: Buttons, forms, modals, cards, and more
- Full Type Safety: TypeScript-first component APIs
- Tailwind CSS: Utility-first styling with Tailwind v4
- Dark Mode: Built-in theme switching with next-themes
- Accessible: ARIA-compliant components from Base UI
- Customizable: Easily modify styles and variants
Architecture
All UI components live inweb/next/src/components/ui/ and use a consistent pattern:
Core Components
Buttons
Versatile button component with multiple variants and sizes:- Tab Title
- Tab Title
- Tab Title
Cards
Composable card components for content containers:components/project-card.tsx
Forms
Form components integrated with TanStack Form and Zod validation:components/signup-form.tsx
Dialogs & Modals
components/delete-confirmation.tsx
Tailwind CSS
ZeroStarter uses Tailwind CSS v4 with a custom configuration.Configuration
app/globals.css
CSS Variables
Colors are defined using CSS variables that automatically switch between light and dark themes:Use these CSS variables in your custom components:
bg-background, text-foreground, border-border, etc.Dark Mode
Dark mode is handled by next-themes and configured in the providers:app/providers.tsx
Theme Switcher
Toggle between light, dark, and system themes:components/mode-toggle.tsx
Icons
ZeroStarter uses Remix Icon for consistent, beautiful icons:Browse all available icons at remixicon.com. Icons are tree-shaken, so only imported icons are included in your bundle.
Typography
ZeroStarter includes four variable fonts:- DM Sans (sans-serif) - Primary UI font
- Newsreader (serif) - Headings and display text
- Caveat (cursive) - Decorative text
- JetBrains Mono (monospace) - Code and technical content
Component Library
ZeroStarter includes 55+ components:Form Components
Form Components
- Input
- Textarea
- Select
- Checkbox
- Radio Group
- Switch
- Slider
- Date Picker (react-day-picker)
- Input OTP
- Combobox
- Command
Layout Components
Layout Components
- Card
- Separator
- Sidebar
- Resizable Panels
- Breadcrumb
- Navigation Menu
- Tabs
- Accordion
- Collapsible
Overlay Components
Overlay Components
- Dialog
- Alert Dialog
- Drawer (Vaul)
- Popover
- Context Menu
- Dropdown Menu
- Tooltip
- Sheet
Feedback Components
Feedback Components
- Toast (Sonner)
- Alert
- Badge
- Progress
- Skeleton
- Avatar
Data Display
Data Display
- Table
- Chart (Recharts)
- Carousel (Embla)
- Calendar
Adding New Components
Use the Shadcn CLI to add components:Customization
Modify component variants
Edit the component file directly:components/ui/button.tsx
Create custom components
Follow the same pattern as existing components:components/ui/feature-card.tsx
Best Practices
// ✅ Good - semantic and accessible
<Button asChild>
<a href="/projects">View Projects</a>
</Button>
// ❌ Avoid - non-semantic
<Button onClick={() => router.push("/projects")}>
View Projects
</Button>
<Card>
<CardHeader>
<CardTitle>User Profile</CardTitle>
</CardHeader>
<CardContent>
<div className="flex items-center gap-4">
<Avatar>
<AvatarImage src={user.image} />
<AvatarFallback>{user.name[0]}</AvatarFallback>
</Avatar>
<div>
<p className="font-medium">{user.name}</p>
<p className="text-sm text-muted-foreground">{user.email}</p>
</div>
</div>
</CardContent>
</Card>
Next Steps
Shadcn UI
Explore all available components and examples
Tailwind CSS
Learn Tailwind’s utility classes and customization