Tailwind CSS
All styling is done with Tailwind utility classes. No CSS modules, no styled-components.- Mobile-first: Use
sm:,md:,lg:breakpoints. - Dark mode: Use semantic CSS variables (
text-foreground,bg-background,text-muted-foreground,border, etc.). - Theming:
next-themes(system/light/dark). Use CSS variables, not hardcoded colors.
Conditional Classes with cn()
Use cn() from @/lib/utils for conditional class merging:
shadcn/ui Components
UI primitives live insrc/components/ui/. Add new components via:
@/ alias:
Don’t modify shadcn/ui files unless necessary. Wrap them instead with custom components.
Icons
Use lucide-react for icons:Component Organization
| Location | Scope | Import pattern |
|---|---|---|
src/components/ui/ | shadcn/ui primitives | @/components/ui/button |
src/components/ | Shared components | 'components' (barrel) |
pages/<name>/components/ | Page-scoped | Relative import within page |
