Skip to main content

Components (components/)

This directory follows atomic design principles to organize UI components by complexity:

Structure

Conventions

  • Styling: All components use Tailwind CSS utility classes via string constants at the bottom of each file. No component-scoped CSS files — use Tailwind’s cn() helper from @/lib/utils for conditional classes.
  • State: Components access state via Zustand stores from @/data/store — never prop-drill store data.
  • Bridge calls: Use send() from @/sync/api for Rust communication via the sync engine.
  • Barrel exports: Each folder has an index.ts for clean imports (e.g., import { Button } from '@/components/atoms').