Overview

A customizable MDX docs framework for Next.js.

PzzaDocs turns a folder of MDX files into a complete documentation site inside your existing Next.js app. You install one package, add four route files, and get a sticky header with navigation tabs, a collapsible sidebar, a table of contents, breadcrumbs, prev/next pagination, command-palette search, and light/dark theming out of the box.

Everything is styled with plain CSS custom properties prefixed --pd-, so you can restyle the whole site from your own globals.css without touching the package or adopting a utility framework.

How it works#

  • Content lives in your repo. Pages are .mdx (or .md) files under content/docs. Folder order, labels, and section separators come from a small meta.json per folder.
  • Rendering happens on the server. createSource reads your content, compiles MDX at request time with full React Server Component support, highlights code with dual light/dark themes, and caches the result per process.
  • The UI is a set of composable components. DocsLayout and DocsPage from pzzadocs/ui assemble the shell, while pzzadocs/mdx ships the Callout, Tabs, Steps, Cards, Accordion, and code block components that are available in every page without imports.

Explore the docs#

More#

Requirements#

RequirementVersion
Next.js16 (App Router)
React19
Node.js24 or newer
TypeScript5.9 (recommended, not required)

Server Components only

createSource reads the filesystem and compiles MDX, so it must run on the server. Keep lib/source.ts out of client components and import it only from route files, layouts, and route handlers.