Shared UI Package
Unified design system and Radix UI primitives shared across Next.js and Vite.
Shared UI Package (`@workspace/ui` / `@repo/ui`)
The shared UI package provides accessible, customizable components built with Tailwind CSS and Radix UI primitives. It eliminates duplicated design code between your Next.js and Vite applications.
Package Layout
The UI package lives in packages/ui:
packages/ui Structure
Creating UI Primitives with CVA
Components use Class Variance Authority (CVA) to provide strict variant typings:
Button CVA Definition
Importing into Applications
In your app's package.json, Morax adds the dependency via the PNPM workspace protocol:
package.json
Zero-Build Symlinks
There is no compilation step or watch daemon required for the UI package. Next.js and Vite transpile TypeScript source files on the fly during development.