A favicon of Shadcn Tailwind4 Turborepo

Shadcn Tailwind4 Turborepo

Explore a monorepo demonstrating Shadcn/ui with TailwindCSS v4, featuring distinct themes for separate web and documentation projects via a shared UI package.

A screenshot of Shadcn Tailwind4 TurborepoVisit

Master Multi-Theme Shadcn/ui & TailwindCSS v4 with Monorepo

This proof-of-concept project demonstrates a robust setup for integrating Shadcn/ui components within a Turborepo monorepo, specifically utilizing TailwindCSS v4. It highlights how to manage and apply multiple distinct themes across different applications—a 'web' project and a 'docs' project—which share a common UI library. The structure features a dedicated 'ui' package for Shadcn components and a 'theme' package where various visual styles are defined, enabling each parent application to select its preferred theme.

Features:

  • Monorepo Architecture: Utilizes Turborepo for efficient management of multiple interconnected projects, including 'web' and 'docs' applications.
  • Shadcn/ui Component Integration: Incorporates a shared 'ui' package containing reusable Shadcn components for consistent user interfaces.
  • TailwindCSS v4 Foundation: Leverages TailwindCSS version 4 for styling, enabling modern utility-first CSS practices.
  • Multi-Theme Support: Demonstrates the capability to apply different themes to distinct projects (e.g., one theme for 'web', another for 'docs').
  • Centralized Theme Definition: Includes a dedicated 'theme' package where available themes are defined and managed.
  • Application-Driven Theme Selection: Parent applications (the 'web' and 'docs' projects) have the autonomy to define and apply their chosen theme from the central theme package.
  • Separate 'web' Project: Contains a distinct 'web' application showcasing one theme.
  • Separate 'docs' Project: Contains a distinct 'docs' application showcasing another theme.
  • Live Deployment Examples: Provides Vercel deployment links for both the 'web' and 'docs' applications, allowing for live previews of the multi-theme setup.

Summary:

This monorepo provides a clear, practical example of implementing Shadcn/ui with TailwindCSS v4, emphasizing multi-theme support. Developers can learn how to build applications with shared UI elements but distinct visual presentations, all managed efficiently within a Turborepo. The project includes distinct 'web' and 'docs' applications, each showcasing a different theme, illustrating the architecture's flexibility for modern development needs and demonstrating how parent applications dictate their chosen theme from a central theme package.

Distribution:
opensource
GitHub:
20 Stars
0
Share:

 

  
 

Similar to Shadcn Tailwind4 Turborepo: