# Fumadocs

> Build better docs, in seconds.

Turn your Markdown into a beautiful docs site! Fumadocs is fully open source, made possible by the community :D I am working hard to make the perfect docs framework :3 Time to own your docs, Fumadocs will keep improving!

- [Get started](https://www.fnepower.com/docs)
- Create a project: `pnpm create fumadocs-app`
- Runs on: [Next.js](https://www.fnepower.com/docs/next/manual-installation), [React Router](https://www.fnepower.com/docs/react-router/manual-installation), [TanStack Start](https://www.fnepower.com/docs/tanstack-start/manual-installation), [Waku](https://www.fnepower.com/docs/waku/manual-installation), [Astro](https://www.fnepower.com/docs/astro/manual-installation)
- For LLMs: [llms.txt](https://www.fnepower.com/llms.txt) indexes the docs, [llms-full.txt](https://www.fnepower.com/llms-full.txt) has all of them; add `.md` to a docs URL for its Markdown.

## Fumadocs is a React documentation framework for developers, beautifully designed by Fuma Nama.

Brings powerful features for your docs workflows. High customizability to fit your preferences. Works seamlessly with any React framework, CMS, anything.

- Restyle any layout or theme with CSS variables.
- [Layouts](https://www.fnepower.com/docs/ui/layouts): 6 layouts and 12 themes, all interchangeable.
  - Layouts: Docs, Notebook, Flux, Glass, Spacious, Home
  - [Themes](https://www.fnepower.com/docs/ui/theme): Neutral (`neutral`), Black (`black`), VitePress (`vitepress`), Dusk (`dusk`), Catppuccin (`catppuccin`), Ocean (`ocean`), Purple (`purple`), Solar (`solar`), Emerald (`emerald`), Ruby (`ruby`), Aspen (`aspen`), shadcn/ui (`shadcn`), each a stylesheet imported as `@import 'fumadocs-ui/css/<id>.css';`
- [Story](https://www.fnepower.com/docs/integrations/story): Live previews of your components, with prop controls.
- [OpenAPI](https://www.fnepower.com/docs/integrations/openapi): API pages with a playground and code samples.
- [GraphQL](https://www.fnepower.com/docs/integrations/graphql): A page per operation, with types and a playground.
- [AsyncAPI](https://www.fnepower.com/docs/integrations/asyncapi): Channels and messages, with a WebSocket playground.

## Express more in fewer words, with the Markdown you already know.

- Writers stay in Markdown, and developers add React components and code checked by Twoslash.

`quick-start.mdx`:

````mdx
---
title: Quick Start
description: Create your first docs site.
---

## Installation

```npm
npm i fumadocs-ui fumadocs-core
```

```ts twoslash title="page.tsx"
import { source } from '@/lib/source';
// @noErrors
source.getP;
//         ^|
```

<Mermaid
  chart="
graph LR
  MDX --> Fumadocs
  Fumadocs --> Page
  Fumadocs --> Search
"
/>
````

## Always up to date. Generate content from your code, the single source of truth.

- `<auto-type-table>` reads a TypeScript type, `<include>` takes code from your files, and async server components in MDX read your data, all at build time.
- One source, many outputs: from `button.tsx` come `ButtonProps`, `button.mdx`, `og.png`, `llms.txt`, `releases`. Change the source and every one of them follows.

`button.tsx`:

```tsx
export interface ButtonProps {
  /** The text inside the button. */
  label: string;
  /** Renders a link instead. */
  href?: string;
  /** @deprecated Use `className`. */
  color?: string;
  /** Called when it is pressed. */
  onPress?: () => void;
}
```

## Designed to be composable, separated as layers.

- Every page runs on these 4 layers, each a library of its own:
  - UI: Layouts and components
    - Fumadocs UI (`fumadocs-ui`): The default theme: beautiful layouts and interactive components.
    - Headless (`fumadocs-core`): Keep the logic, bring your own design.
    - Your copy (`@/layouts/docs`): The UI installed into your codebase, yours to edit.
  - Core: Search, page tree, TOC and i18n (fixed)
    - Fumadocs Core (`fumadocs-core`): The logic every page needs: search, page tree, TOC and i18n.
  - Content: Where your pages come from
    - Fumadocs MDX (`fumadocs-mdx`): Turns your Markdown and MDX files into pages.
    - Notion (`@fumadocs/notion`): Write your pages in Notion instead.
    - Content Collections (`@fumadocs/content-collections`): Load your Markdown through Content Collections.
    - Sanity (`@fumadocs/sanity`): Pull your pages from Sanity, a headless CMS.
    - Obsidian (`fumadocs-obsidian`): Publish your Obsidian vault as docs.
  - Framework: What your docs run on
    - Next.js (`next`): Runs your docs as a Next.js app.
    - React Router (`react-router`): Same docs, on React Router.
    - TanStack Start (`@tanstack/react-start`): Same docs, on TanStack Start.
    - Waku (`waku`): Same docs, on Waku.
    - Astro (`astro`): Same docs, on Astro.

## Extend your docs with integrations, effortlessly.

- [Search](https://www.fnepower.com/docs/search) (`fumadocs-core/search`): ZBSearch built in, or Algolia and more. Add it with `npx @fumadocs/cli feature search`.
- [OpenAPI](https://www.fnepower.com/docs/integrations/openapi) (`fumadocs-openapi`): API pages and a playground from your spec. Add it with `npm i fumadocs-openapi shiki`.
- [AI Chat](https://www.fnepower.com/docs/integrations/llms#ask-ai) (`@fumadocs/ai-chat`): Ask AI, answered from your docs. Add it with `npx @fumadocs/cli feature ai`.
- [llms.txt](https://www.fnepower.com/docs/integrations/llms) (`fumadocs-core/source`): Every page as Markdown for AI agents. Add it with `npx @fumadocs/cli feature llms`.
- [i18n](https://www.fnepower.com/docs/internationalization) (`fumadocs-core/i18n`): Localized routes, page trees and UI text. Add it with `npx @fumadocs/cli init --i18n`.
- [OG Image](https://www.fnepower.com/docs/integrations/og) (`fumadocs-ui/og`): Open Graph images for every page. Add it with `npx @fumadocs/cli feature og`.
- More: [AsyncAPI](https://www.fnepower.com/docs/integrations/asyncapi), [GraphQL](https://www.fnepower.com/docs/integrations/graphql), [Twoslash](https://www.fnepower.com/docs/markdown/twoslash), [Type Table](https://www.fnepower.com/docs/ui/components/auto-type-table), [Story](https://www.fnepower.com/docs/integrations/story), [Obsidian](https://www.fnepower.com/docs/integrations/content/obsidian), [Changelog](https://www.fnepower.com/docs/integrations/changelog), [Blog](https://www.fnepower.com/docs/integrations/blog), [Feedback](https://www.fnepower.com/docs/integrations/feedback), [MCP Server](https://www.fnepower.com/docs/integrations/llms#mcp-server), [WebMCP](https://www.fnepower.com/docs/integrations/llms#webmcp), [EPUB Export](https://www.fnepower.com/docs/guides/export-epub), [Graph View](https://www.fnepower.com/docs/ui/components/graph-view), [Image Zoom](https://www.fnepower.com/docs/ui/components/image-zoom), [Banner](https://www.fnepower.com/docs/ui/components/banner), [GitHub Info](https://www.fnepower.com/docs/ui/components/github-info), [Math](https://www.fnepower.com/docs/markdown/math), [Static Export](https://www.fnepower.com/docs/deploying/static), [Notion](https://www.fnepower.com/docs/integrations/content/notion), [Sanity](https://www.fnepower.com/docs/integrations/content/sanity), [Python](https://www.fnepower.com/docs/integrations/content/python), [Content Collections](https://www.fnepower.com/docs/headless/content-collections), [MDX Remote](https://www.fnepower.com/docs/integrations/content/mdx-remote), [Local Markdown](https://www.fnepower.com/docs/integrations/content/local-md), [Local HTML](https://www.fnepower.com/docs/integrations/content/local-html), [OpenAPI Standalone](https://www.fnepower.com/docs/integrations/openapi/standalone), [Visual Editor](https://www.fnepower.com/docs/editor), [Preview CLI](https://www.fnepower.com/docs/cli/preview)

## Need more control? Use Fumadocs CLI to install and own the UI as code.

- `npx @fumadocs/cli customize` copies a layout into `layouts/` and points your route files at it.
- `npx @fumadocs/cli add banner files` installs components from the Fumadocs registry, with their imports rewritten for your project.
- `npx @fumadocs/cli feature <name>` sets up a feature, such as `ai` or `search`, and wires it into your app.
- [CLI guide](https://www.fnepower.com/docs/cli)

## Battle-tested, running in production.

- GitHub stars: 13,683 (`fuma-nama/fumadocs`)
- Weekly downloads: 3,999,518 (`fumadocs-core`)
- Contributors: 208 (`fuma-nama/fumadocs`)
- [Showcase](https://www.fnepower.com/showcase): [shadcn/ui](https://ui.shadcn.com), [Better Auth](https://better-auth.com), [c15t](https://c15t.com), [Better-T-Stack](https://better-t-stack.dev), [Zod](https://zod.dev), [Prisma](https://prisma.io), [nuqs](https://nuqs.47ng.com), [Dokploy](https://dokploy.com), [Ultracite](https://ultracite.ai), [Sim](https://sim.ai), [AgentsKit](https://www.agentskit.io), [generative-a11y](https://generativea11y.com), [OpenPost](https://docs.openpo.st), [Turbobulls](https://www.turbobulls.com/help), [HotCodePush](https://hotcodepush.com/docs), [ComfyDeploy](https://comfydeploy.com), [Conductor](https://conductor.build/docs), [Cossistant](https://cossistant.com), [LLM Gateway](https://llmgateway.io), [Nativewind](https://www.nativewind.dev), [ArkType](https://arktype.io), [Zen Browser](https://docs.zen-browser.app), [HeroUI](https://v3.heroui.com), [Documenso](https://docs.documenso.com), [MrScraper](https://docs.mrscraper.com), [Hiro](https://docs.hiro.so/stacks), [Next.js Discord Common Questions](https://nextjs-faq.com), [OpenPanel](https://openpanel.dev), [Animate UI](https://animate-ui.com), [Sora UI](https://ui.soralabs.studio), [Kibo UI](https://kibo-ui.com), [HextaUI](https://hextaui.com), [MixSpace](https://mx-space.js.org), [Libra](https://libra.dev), [Sunar](https://sunar.js.org), [Freestyle](https://freestyle.sh), [Zap Studio](https://zapstudio.dev), [Vision UI](https://vision.uing.dev), [YAMLResume](https://yamlresume.dev), [Kaneo](https://kaneo.app), [axion/js](https://axionjs.com), [Code Hike](https://codehike.org), [assistant-ui](https://assistant-ui.com), [Constatic](https://constatic-docs.vercel.app), [supastarter](https://supastarter.dev), [ExpoStarter](https://expostarter.com/docs), [nx.js](https://nxjs.n8.io), [TurboStarter](https://turbostarter.dev), [ModelFetch](https://modelfetch.com), [FASHN AI](https://fashn.ai), [Dirstarter](https://dirstarter.com), [Rehooks](https://rehooks.pyr33x.ir), [Swellchain](https://build.swellnetwork.io), [ESLint React](https://eslint-react.xyz), [LlamaIndex](https://ts.llamaindex.ai), [Clojure Stack Lite](https://stack.bogoyavlensky.com), [BProgress](https://bprogress.vercel.app), [nextjs i18n docs](https://nextjs.im), [Yeecord](https://yeecord.com), [ArkEnv](https://arkenv.js.org), [Turbo](https://turbo.build), [Flags SDK](https://flags-sdk.dev), [Chat SDK](https://chat-sdk.dev)

## Loved by the best developers & teams.

> You know how you end up rebuilding a full docs site every time you start a new project? Fumadocs fixes this by giving you all the right blocks that you compose together. Like headless docs to build exactly what you need.
>
> shadcn, Creator of Shadcn UI

> Major shoutout to @fuma_nama for making fumadocs, a gorgeous documentation framework that composes beautifully into the App Router.
>
> Anthony Shew, Turbo DX at Vercel

> fumadocs is the best Next.js docs framework
>
> Aiden Bai, Creator of Million.js

> I'd have no shot building @arktypeio docs that looked half this good without it 😍
>
> David Blass, Creator of Arktype

## Your docs are 1 command away.

```bash
pnpm create fumadocs-app
```

[Read the docs](https://www.fnepower.com/docs).