Shadcn/ui
Own your design system.
Shadcn/ui
Open-system React component library powered by Radix UI Primitives, and Tailwind CSS.
Radix UI Primitives
Headless UI component library that complies with WAI-ARIA accessibility guidelines and handles complex interaction logic. Used by CodeSandbox, Node.js, Vercel, and more.
Tailwind CSS
Provides low-level primitive tokens to rapidly create design systems and scale them with ease.
Installation
While the Fumadocs UI design system is inspired by Shadcn/ui and also uses Tailwind CSS, it does not use the same tokens and is therefore not compatible. Installing Shadcn/ui will overwrite the current Tailwind CSS configuration, which will break Fumadocs UI.
Next.js allows for separate Root layouts for different routes, which will allow us to use both design systems without conflicts.
Separate design systems
Create (home)/
under app/
. Copy global.css
, layout.tsx
, and page.tsx
from app/
into app/(home)/
.
Then cut/move layout.config.tsx
, source.ts
, and global.css
into app/docs/
.
Delete layout.tsx
in app/
.
Now see the After
tab.
Rename and modify files
Rename src/app/docs/global.css
-> src/app/docs/fumadocs.global.css
.
Rename tailwind.config.js
, to -> tailwind.config.ts
.
Duplicate tailwind.config.ts
, name it to -> tailwind.fumadocs.config.ts
.
Make the following changes in the following files.
You can use these commands to rename the files:
Run Shadcn/ui install script
Follow the below steps and cross-check with the instructions in the Shadcn/ui docs to install Shadcn. Step 1 on their docs can be skipped, as we've already set up a Next.js project.
Add configurations
Last updated on