Skip to main content
The Starter Kit includes a comprehensive component library built on Radix UI primitives with Tailwind CSS styling. These components provide a consistent design system and accelerate development of your AI-powered application.

Component Organization

The components/ directory follows a structured organization pattern:

UI Components (components/ui/)

Base UI primitives wrapped from Radix UI with Tailwind styling and class-variance-authority for variants.

Form Components

Button (button.tsx)
Variants: default, destructive, outline, secondary, ghost, link
Sizes: default, sm, lg, icon
Input (input.tsx)
Textarea (textarea.tsx)
Checkbox (checkbox.tsx)
Label (label.tsx)
Select (select.tsx)

Layout Components

Card (card.tsx)
Separator (separator.tsx)
Sheet (sheet.tsx)
Tabs (tabs.tsx)

Display Components

Avatar (avatar.tsx)
Badge (badge.tsx)
Skeleton (skeleton.tsx)
Table (table.tsx)

Interactive Components

Dropdown Menu (dropdown-menu.tsx)
Tooltip (tooltip.tsx)
Alert Dialog (alert-dialog.tsx)

Generic Components (components/generic/)

Reusable cross-project components designed for portability: CodeBlock (code-block.tsx) - Syntax-highlighted code display CategoryGrid (category-grid.tsx) - Grid layout for categories CtaButton (cta-button.tsx) - Call-to-action button FloatingNav (floating-nav.tsx) - Floating navigation bar InfoBox (info-box.tsx) - Information display box PageHeader (page-header.tsx) - Consistent page headers ScrollIndicator (scroll-indicator.tsx) - Scroll progress indicator ThemeToggle (theme-toggle.tsx) - Light/dark mode switcher ToC (toc.tsx) - Table of contents generator

Project Components (components/project/)

Project-specific chrome components: Header (header.tsx) - Main navigation header with mobile menu, theme switcher, CTA button Footer (footer.tsx) - Site footer with links and copyright Pricing (pricing/) - Pricing table components

Shared Components

FormMessage (form-message.tsx) - Form validation message display
SubmitButton (submit-button.tsx) - Form submit button with loading state
ThemeSwitcher (theme-switcher.tsx) - Theme selection dropdown

Styling System

Tailwind CSS

All components use Tailwind utility classes:

Dark Mode Support

Components automatically support dark mode via dark: prefix:

Class Variance Authority

Component variants managed with class-variance-authority:

Utility Functions

cn() Helper

Conditional class merging utility:

Component Dependencies

Radix UI Packages:
  • @radix-ui/react-alert-dialog
  • @radix-ui/react-avatar
  • @radix-ui/react-checkbox
  • @radix-ui/react-dropdown-menu
  • @radix-ui/react-label
  • @radix-ui/react-select
  • @radix-ui/react-separator
  • @radix-ui/react-slot
  • @radix-ui/react-tabs
  • @radix-ui/react-tooltip
Styling:
  • tailwindcss
  • class-variance-authority
  • tailwind-merge
  • clsx
Icons:
  • lucide-react

Customization Guidelines

Extending Components

Create custom variants by extending existing components:

Creating New Components

Follow the established patterns:

Theming

Customize colors in tailwind.config.ts:
Define CSS variables in globals.css:

Best Practices

Always use the cn() utility when combining class names to ensure proper Tailwind class merging.
Component Usage:
  1. Import components from @/components/ui/* for base primitives
  2. Use semantic HTML elements where appropriate
  3. Provide accessible labels and ARIA attributes
  4. Test components in both light and dark modes
  5. Keep component props minimal and focused
Performance:
  1. Use React.forwardRef for components that need refs
  2. Memoize expensive computations with useMemo
  3. Avoid inline function definitions in render
  4. Use React.memo for pure components
Accessibility:
  1. Include proper ARIA labels
  2. Ensure keyboard navigation works
  3. Test with screen readers
  4. Maintain sufficient color contrast
  5. Provide focus indicators

Branding & Styling

Customize colors, fonts, and visual identity

Theme Configuration

Configure dark mode and theme settings

Custom Pages

Create new pages using components

App Configuration

Configure app-wide settings