Fumadocs

Build better docs, in seconds.

Fumadocs is a React documentation framework. Your Markdown becomes a full docs site with navigation, search and a beautiful UI, on the React framework you already use.

pnpm create fumadocs-app

Search finds the exact answer.

A matching row of a table comes back as the row itself, so readers often get their answer without opening the page.

#details
hide prefix
always
Always hide the prefix, detect locale from cookies
never
Never hide the prefix (default)

Content is code.

Pages are MDX files next to your code, and Twoslash checks your examples against your types. A mistake stops the deploy instead of reaching readers.

lib/slug.ts:5:22 TS2345

#write
slugify.mdx
slugify()

Usage

Pass any title, and the slug comes back in lowercase with dashes between its words.

Stable links

The same title always gives the same slug.

lib/slug.ts
export function slugify(title: string) {
  return title.toLowerCase().replaceAll(' ', '-');
}

const slug = slugify(42);
TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
TS23455:22

Your API docs stay in sync.

Reference pages are built from your schemas and types on every deploy, so they always match the code you ship.

openapi.jsonrev 1

AI-native by default.

Every page is also served as Markdown, listed in llms.txt and searchable over MCP, so coding agents read your docs instead of guessing.

Banner

Add a banner to your site

Install to your codebase

Easier customization & control.

npx @fumadocs/cli@latest add banner

Usage

Put the element at the top of your root layout, you can use it for displaying announcements.

import { Banner } from 'fumadocs-ui/components/banner';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <Banner>Hello World</Banner>
        {children}
      </body>
    </html>
  );
}

Variant

Change the default variant.

import { Banner } from 'fumadocs-ui/components/banner';

<Banner variant="rainbow">Hello World</Banner>;

// customize colors
<Banner
  variant="rainbow"
  rainbowColors={[
    'rgba(255,100,0, 0.5)',
    'rgba(255,100,0, 0.5)',
    'transparent',
    'rgba(255,100,0, 0.5)',
    'transparent',
    'rgba(255,100,0, 0.5)',
    'transparent',
  ]}
>
  Hello World
</Banner>;

Change Layout

By default, the banner uses a style tag to modify Fumadocs layouts (e.g. reduce the sidebar height). You can disable it with:

import { Banner } from 'fumadocs-ui/components/banner';

<Banner changeLayout={false}>Hello World</Banner>;

Close

To allow users to close the banner, give the banner an ID.

import { Banner } from 'fumadocs-ui/components/banner';

<Banner id="hello-world">Hello World</Banner>;

The state will be automatically persisted.

# Fumadocs UI (the default theme of Fumadocs): Banner
URL: /docs/ui/components/banner
Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/banner.mdx

Add a banner to your site

Install to your codebase:

```bash
npx @fumadocs/cli@latest add banner
```

## Usage [#usage]

Put the element at the top of your root layout, you can use it for displaying announcements.

```tsx
import { Banner } from 'fumadocs-ui/components/banner';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        {/* [!code ++] */}
        <Banner>Hello World</Banner>
        {children}
      </body>
    </html>
  );
}
```

### Variant [#variant]

Change the default variant.

```tsx
import { Banner } from 'fumadocs-ui/components/banner';

<Banner variant="rainbow">Hello World</Banner>;

// customize colors
<Banner
  variant="rainbow"
  rainbowColors={[
    'rgba(255,100,0, 0.5)',
    'rgba(255,100,0, 0.5)',
    'transparent',
    'rgba(255,100,0, 0.5)',
    'transparent',
    'rgba(255,100,0, 0.5)',
    'transparent',
  ]}
>
  Hello World
</Banner>;
```

### Change Layout [#change-layout]

By default, the banner uses a `style` tag to modify Fumadocs layouts (e.g. reduce the sidebar height).
You can disable it with:

```tsx
import { Banner } from 'fumadocs-ui/components/banner';

<Banner changeLayout={false}>Hello World</Banner>;
```

### Close [#close]

To allow users to close the banner, give the banner an ID.

```tsx
import { Banner } from 'fumadocs-ui/components/banner';

<Banner id="hello-world">Hello World</Banner>;
```

The state will be automatically persisted.
GET /docs/ui/components/banner.md1,702 B

Customize every layer.

Content, core and UI are separate layers. Configure one and keep updating, or copy its code with the CLI and change anything.

npx @fumadocs/cli customize

#layers
customize
docs

Every docs feature is built in.

No plugins to hunt for. Each feature ships with Fumadocs in the same design, and updates with it.

Internationalization

InternationalizationPages in every language, the UI's text in 3 more./docs/next/internationalization

Bring your own stack.

Keep your React framework and your content source, and give readers the UI in their language.

npx @fumadocs/cli init
#stack
@fumadocs/cli

Trusted by teams in production.

UI libraries, auth frameworks, databases and validators publish their docs with Fumadocs.

“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.”

shadcnCreator of Shadcn UI

“Major shoutout to @fuma_nama for making fumadocs, a gorgeous documentation framework that composes beautifully into the App Router.”

Anthony ShewTurbo DX at Vercel

“I'd have no shot building @arktypeio docs that looked half this good without it 😍”

David BlassCreator of Arktype

Your docs are one command away.

pnpm create fumadocs-app

#start
my-docs

Hello World

Your first document

Welcome to the docs! You can start writing documents in /content/docs.

console.log('Hello World');

What's next?

+next+fuma-docs-mdx

Learn more about Next.js

Learn more about Fumadocs

fuma-namajunaidanjumkane50613aryasaatvikPANJA-ABHISHEKchenxin-yannktnet1siyamhosankyrylolvovoutsleptsidgaikwadcoderrshyamlord-0011nickvigilanteMichaelErmernainglinnkhantsebdanielssonpjborowieckihyobanstaciaxpombernikhiltidke101chocochuhimself65imliuruiqiYonomgronxbremorsesTwinki14joulevxiaoyu2erzaidmukaddamGitstar-OCmehdibhawdonsongshenxianovowjsojnelsonlaidevndom91olabrahmiLioRaeldensumeshyamcodesvitorbarifranky47Axyl1410ariesclarkclaudeAmanVarshney01materwelonDhruvdimaMachinaalexcarpenterAdamMikacichankrgylanthonyshewLeCarteloosmakoshte6-inmiki-tebemojtabamoosaviMFarabi619Nic13GamerroastlechonofficialrajdeepsinghramonclaudiorubenskjsalemaljebalyShikChenShatlyk1011seangray-devMaliksidk19huruitherohanparmarchakkyySoonIterstefanofaFairy-nnSufyrSyntaxHQDEVbytaesuzigang93taqhMokiMeowmrzmyrmkeskinnmnnrjdalalNeko-vecteroscartbeaumontowenwahlgrenPickleNikPieterDePauwPieterT2000hasparusR4ULtvrikublockrishi-raj-jainbuchariteshrobingenzrodrgdstherohanparmarTinsFoxgwigzicepengjrizo0kakdukikijvktKongTongllayz46memmmmikexrtisnazo6rez1-devshakedhagagshaked-framesongkeysspookybytesyoutridenticxqe2011yamz8NICHTJ3garnertbVanshbordiab84330808WillKirkmanMproductdevbookxirothedevyangshunMondayChagangokZain-hareerWh1isperananaszjoeasyncAndChillbenqszbhaveshchow20shczheneliasfaltinchakkyySpyC0der77BurnedChrisdlcastillopDanielPe05mintydev789denizguzelDiegiwgscopsydulapahvdzaky-penaEDALJOEmersonBraunfabianhugtrueberrylessfellipeutakafveiraswwwGermanJabloGioPan04hktitofPythonHacker24agusgarcia3007akhil-naiduAlexProgrammerDEunrevised6419amikofalvyAn-dzneoantoxanuragmitra4arimxyer4rpanSepushasyntaiavner-mAyushSinghal20Bartek532brbrainerdCarlosEduJsdevnjwJiralitejochemvanweeldejohangusejonathanwilkekevin1kidonngyeskunallFarhan291lucperkins12LuALuggaPuggaluke-hagar-spmatejmz4nr34lshenxiangzhuangHardMax71mehrdadrafieeWonderSTKsheen4nGyeonghun-Parksaoudi-hhexaaagonjun094kowyoiyansrfeixuedevisboyjcjpage-godaddyjkukulja-andrewsJamiewarbSchutteJanjasontd92EnhancedJax

byFuma Nama

MIT license

fumadocs-core 16.19.8