26

Getting Started

How content, routing, and the docs UI fit together.

Content

MDX files live in content/docs. Frontmatter needs at least a title:

---
title: My Page
description: Optional description
---

## Hello

Routing

Pages are served at /docs/* from app/docs/[[...slug]]/page.tsx. The page tree comes from lib/source.ts.

Component preview

Live examples use ComponentPreview — full content width, roughly a quarter of the viewport tall:

<ComponentPreview title="Button">
  <Button>Click me</Button>
</ComponentPreview>
Button

Installation commands

CLI blocks use CliCommand — colored package manager logo on the left, dropdown on the right:

<CliCommand command="shadcn@latest add button" />
pnpm dlx shadcn@latest add button

Customizing the UI

PieceWhere to edit
Site title / nav linkslib/layout.shared.tsx
Docs sidebar layoutapp/docs/layout.tsx
Page title, TOC, bodyapp/docs/[[...slug]]/page.tsx
MDX component mapcomponents/mdx.tsx
Shadcn sidebar kitcomponents/ui/sidebar.tsx