Documentation Index
Fetch the complete documentation index at: https://mintlify.com/facebook/docusaurus/llms.txt
Use this file to discover all available pages before exploring further.
@docusaurus/theme-classic is the default and only production-ready Docusaurus main theme. It delivers a complete documentation site UI out of the box: responsive navbar, footer, collapsible sidebar, table of contents, breadcrumbs, version banners, doc and blog layouts, MDX page rendering, syntax-highlighted code blocks, and more. The theme is built on Infima, a purpose-built CSS framework for documentation, and exposes dozens of CSS custom properties so you can reskin the site without touching any component source code.
Installation
If you are using
@docusaurus/preset-classic, theme-classic is already installed and configured. You do not need to install it separately.docusaurus.config.js
Configuration
theme-classic accepts a single plugin-level option:
| Option | Type | Default | Description |
|---|---|---|---|
customCss | string | string[] | [] | One or more CSS files to import globally as client modules. Paths are relative to the site directory. |
- Via preset (recommended)
- Via plugin option
docusaurus.config.js
The vast majority of visual configuration — navbar, footer, color mode, Prism syntax highlighting — lives in
themeConfig, not in the plugin options above. See the Theme Configuration reference for details.Infima CSS integration
theme-classic imports Infima’s default stylesheet automatically. Infima is a component-based CSS framework that uses CSS custom properties extensively, making it straightforward to restyle the entire site by overriding a small set of variables in your custom CSS file.
The most important Infima variables to override are the primary color shades. Infima expects you to provide the full 0–9 scale:
src/css/custom.css
Dark mode CSS variables
Override variables inside the[data-theme='dark'] selector to apply dark-mode-specific values:
src/css/custom.css
Commonly used CSS variables
| Variable | Purpose |
|---|---|
--ifm-color-primary | Main accent color (links, buttons, active states) |
--ifm-font-family-base | Body font stack |
--ifm-font-family-monospace | Code font stack |
--ifm-font-size-base | Base font size |
--ifm-line-height-base | Base line height |
--ifm-navbar-height | Height of the top navbar |
--ifm-sidebar-width | Width of the doc sidebar |
--ifm-toc-border-color | Color of the table of contents border |
--ifm-code-font-size | Font size inside inline and block code |
--docusaurus-highlighted-code-line-bg | Background for highlighted code lines |
Swizzlable components
Every component in the table below can be replaced or wrapped with your own version usingnpx docusaurus swizzle. Components marked safe have a stable interface; unsafe components may change between minor releases.
Layout and navigation
Layout and navigation
Docs components
Docs components
| Component | Description |
|---|---|
DocItem | Root layout for an individual documentation page |
DocRoot | Container that hosts the sidebar and doc content area |
DocsRoot | Top-level docs wrapper (handles versioning context) |
DocSidebar | The collapsible sidebar used on doc pages |
DocSidebarItem | A single item (link, category, or HTML) inside the sidebar |
DocSidebarItems | Renders a list of sidebar items |
DocBreadcrumbs | Breadcrumb navigation at the top of a doc page |
DocPaginator | Previous / next navigation at the bottom of a doc page |
DocVersionBadge | Badge that shows the active docs version |
DocVersionBanner | Banner warning when browsing a non-latest version |
DocVersionRoot | Provides version context to doc pages |
DocCard | Card used in generated category index pages |
DocCardList | Grid of DocCard components |
DocCategoryGeneratedIndexPage | Auto-generated landing page for a sidebar category |
DocTagsListPage | Page listing all doc tags |
DocTagDocListPage | Page listing docs that share a given tag |
EditThisPage | ”Edit this page” link pointing to the source file |
EditMetaRow | Row combining “Edit this page” and “Last updated” |
LastUpdated | Displays the last-updated timestamp |
Blog components
Blog components
| Component | Description |
|---|---|
BlogLayout | Root layout for all blog pages |
BlogListPage | Page listing recent blog posts |
BlogListPaginator | Pagination controls on blog list pages |
BlogPostItem | Summary card for a single post on the list page |
BlogPostItems | Renders a list of BlogPostItem components |
BlogPostPage | Full layout for reading a single blog post |
BlogPostPaginator | Previous / next navigation within blog posts |
BlogSidebar | Sidebar shown on blog pages |
BlogTagsListPage | Page listing all blog tags |
BlogTagsPostsPage | Page listing posts for a specific tag |
BlogArchivePage | Chronological archive of all blog posts |
Content and markdown components
Content and markdown components
| Component | Description |
|---|---|
CodeBlock | Syntax-highlighted fenced code block |
CodeInline | Inline code span |
MDXComponents | Maps HTML element names to React components for MDX |
MDXContent | Wraps MDX page content |
MDXPage | Full page layout for standalone MDX pages |
Admonition | Renders :::note, :::tip, :::warning, etc. |
Details | Expandable <details> / <summary> element |
Heading | Section heading with anchor link |
Tabs | Tabbed content container |
TabItem | Individual tab pane inside Tabs |
ThemedImage | Image that swaps src based on the active color mode |
Mermaid | Placeholder component (replaced by theme-mermaid) |
Table of contents components
Table of contents components
| Component | Description |
|---|---|
TOC | Fixed table of contents shown on the right side of doc pages |
TOCCollapsible | Collapsible TOC used on mobile |
TOCInline | Inline TOC that can be embedded anywhere in content |
TOCItems | Renders the list of heading links inside any TOC variant |
Tags, icons, and metadata
Tags, icons, and metadata
RTL support
theme-classic ships RTL-transformed versions of the Infima stylesheet and uses postcss-rtlcss to transform your custom CSS at build time whenever the active locale is configured with direction: 'rtl'. No extra setup is needed beyond locale configuration.