Installation
Get started with DocsUI in your project in three steps
Requirements
- Node.js 18 or later
- A React project using Next.js or Vite React
- Tailwind CSS configured
Quick Start
1. Initialize
Run the CLI in your project root:
npx docsui-cli@latest initThis creates docsui.json with your project configuration and installs the cn() utility.
2. Add Components
Add the components you need:
npx docsui-cli@latest add callout accordion code-blockOr run without arguments to pick interactively:
npx docsui-cli@latest add3. Register Components
Add the installed components to your mdx-components.tsx:
import { Callout } from "@/components/mdx/callout";
import {
Accordion,
AccordionItem,
AccordionTrigger,
AccordionContent,
} from "@/components/mdx/accordion";
export const components = {
Callout,
Accordion,
AccordionItem,
AccordionTrigger,
AccordionContent,
};Framework Guides
CLI Reference
| Command | Description |
|---|---|
docsui init | Set up DocsUI in your project |
docsui add [components] | Add components |
docsui update [components] | Update to latest |
docsui remove [components] | Remove components |
docsui list | List all available components |
docsui doctor | Check project health |
docsui new [title] | Scaffold a new .mdx page |
docsui save | Save MDX content to a structured path |