Nectar UI/
Overview
Stack • Structure • UtilsArchitecture.
Under the hood of Nectar UI. A look at the technical decisions, folder structure, and utility functions that power the system.
src/lib/utils.tsStylingTailwind v4
MotionFramer Motion
Source Code
Inspect the commit history and typescript config.
Next.js 14 App Router • Public Repo
Colocation Strategy
I follow a strict colocation pattern. Components live in `src/components/ui`, while business logic stays in feature folders. This creates a clear separation between 'The System' (Nectar) and 'The Product'.
The 'cn' Utility
To allow for safe style overrides, every component uses a `cn()` helper that merges Tailwind classes using `clsx` and `tailwind-merge`. This prevents specificity conflicts.
src/lib/utils.ts