The Mental Model
The Fumadocs framework consists of three main layers working together:Fumadocs Core - The Headless Engine
A framework-agnostic library (
fumadocs-core) that handles:- Page tree generation - Automatic sidebar navigation from file structure
- Document search - Full-text search with Orama, Algolia, or custom engines
- Content source adapters - Unified API for different content backends
- MDX processing - Syntax highlighting, Twoslash, and custom plugins
- Breadcrumbs & TOC - Automatic navigation helpers
- Internationalization - Built-in i18n routing and content negotiation
fumadocs-coreFumadocs UI - The Default Theme
A beautiful, accessible component library (
fumadocs-ui) providing:- Multiple layouts - Docs, Blog, Landing page layouts
- Interactive components - Tabs, accordions, callouts, code blocks
- Mobile-responsive - Optimized for all screen sizes
- Dark mode - Smooth theme switching with persistence
- Customizable - Full Tailwind CSS control
fumadocs-uiContent Sources - The Adapter Layer
Flexible adapters for different content backends:
- Fumadocs MDX - Local MDX files with TypeScript validation
- Content Collections - Astro-style content management
- Headless CMS - Contentful, Sanity, Strapi, etc.
- Custom sources - Implement the source API for any backend
fumadocs-mdxCore Philosophy
1. A Framework You Can Break
Fumadocs was created to be less opinionated and more customizable than traditional documentation frameworks.Traditional Frameworks
Configure everything in a config file. Want to change how pages render? Too bad—it’s hidden behind abstractions. Need custom behavior? Fight against the framework or write plugins with limited APIs.
Fumadocs Approach
Write code, not config. Full control over rendering, routing, and data fetching. Need to customize something? You have direct access to the components and logic. It’s just React.
2. Code Over Configuration
Instead of massive configuration files, Fumadocs uses code as configuration:lib/source.ts
3. Server-First Architecture
Unlike traditional static site generators, Fumadocs embraces React Server Components:Static Sites
Generate everything at build time. Content is frozen until the next build. No dynamic data.
Fumadocs
Render on the server with perfect client-server boundaries. Content can be dynamic, data can be fetched at request time, and you still get static exports.
- Fetch data from databases or APIs in your docs
- Integrate with CMSs for real-time updates
- Generate pages dynamically based on user data
- Still export to static HTML for edge hosting
4. Seamless Framework Integration
Fumadocs is designed to integrate with your existing React framework, not replace it: For Next.js developers:- Use App Router conventions naturally
- Static Site Generation works out of the box
- Incremental Static Regeneration available
- All Next.js features (middleware, API routes, etc.) work normally
- Support for Tanstack Start, Waku, React Router
- File-based routing integration
- Optimized builds with Vite’s speed
5. Composable UI Components
Inspired by Shadcn UI, Fumadocs UI follows a “copy-paste” approach:- Modify styles however you want
- Change behavior to match your needs
- Remove features you don’t need
- Add new functionality
6. Minimal Yet Powerful
Fumadocs focuses on making basic features perfect rather than trying to do everything:In Scope
- Document rendering & navigation
- Search & indexing
- Syntax highlighting
- Component library
- Internationalization
- Theme customization
Bring Your Own
- Analytics (Plausible, Umami, etc.)
- Authentication & user management
- Comments (Giscus, Utterances)
- CMS integration
- Custom features for your use case
When to Use Fumadocs
Fumadocs shines in scenarios where you need flexibility and integration:Perfect For:
Documentation Sites
API references, product docs, developer portals. Rich components, search, and beautiful presentation.
Hybrid Applications
Apps that need docs alongside other pages. Blog + docs + marketing site all in one project.
Dynamic Content
Docs that pull from CMSs, databases, or APIs. Real-time updates without rebuilds.
Custom Requirements
When you need full control. Authentication, custom UI, special workflows—build it your way.
Maybe Not For:
Real-World Use Cases
1. SaaS Product Documentation
2. Multi-Product Documentation
Use sidebar tabs to organize docs for multiple products:app/docs/layout.tsx
3. API Documentation with OpenAPI
Automate API docs from OpenAPI specs:4. Blog + Documentation Hybrid
Technical Architecture
Page Tree Generation
Fumadocs automatically builds a page tree from your file structure:- Sidebar navigation with nested folders
- Breadcrumbs
- Previous/next page links
- Search indexing
Content Source API
All content sources implement a unified interface:Search Architecture
Fumadocs provides search adapters for multiple engines:- Orama (built-in) - Client-side full-text search
- Algolia - Hosted search with advanced features
- Custom - Implement your own search provider
Performance Characteristics
Build Time
Fast incremental builds. Only changed pages are regenerated. Parallel processing for large sites.
Runtime Performance
Static by default. Zero JavaScript for content pages (optional). Code splitting and lazy loading.
Bundle Size
Core: ~20KB gzipped. UI: ~40KB gzipped. Tree-shakeable—only import what you use.
Search
Client-side search with Orama: ~5KB + index. Algolia: external host, minimal bundle impact.
Ecosystem & Extensions
Comparisons with Other Frameworks
vs. Docusaurus
vs. Docusaurus
Docusaurus: More batteries-included, but less flexible. Configuration-heavy. React, but you write little React code.Fumadocs: Code-first, highly customizable. You write React and have full control. Lighter weight.Choose Fumadocs if: You want flexibility and integration with existing React apps.
vs. VitePress
vs. VitePress
VitePress: Vue-based, very simple, fast. Great for straightforward docs with minimal customization.Fumadocs: React-based, more powerful for complex use cases. Better integration with React ecosystems.Choose Fumadocs if: You’re in the React ecosystem or need advanced features.
vs. Nextra
vs. Nextra
Nextra: Next.js-specific, simpler setup. Good for quick docs.Fumadocs: Multi-framework support, more UI options, actively maintained with modern patterns.Choose Fumadocs if: You want cutting-edge features and long-term maintainability.
vs. Starlight (Astro)
vs. Starlight (Astro)
Starlight: Astro-based, component-agnostic (Vue, React, Svelte). Very fast.Fumadocs: React-only, but deeper React integration. Server components, RSC streaming.Choose Fumadocs if: You’re building a React app and want unified architecture.
Community & Contributions
Fumadocs is maintained by Fuma Nama and a growing community of contributors.Open Source
MIT licensed. Contributions welcome. Active development with regular releases.
Community Support
GitHub Discussions for questions. Discord for real-time help. Active maintainer responses.
Interested in contributing? Check out the Contributing Guide to get started.
Getting Started
Ready to try Fumadocs?Quick Start
Create a new project in minutes
Manual Installation
Add to an existing project