Components
Additional components to improve your docs
Overview
Additional components that you can use:
Accordion
Add Accordions to your documentation
Auto Type Table
Auto-generated type table
Banner
Add a banner to your site
Code Block
Displaying Shiki highlighted code blocks
Code Block (Dynamic)
A codeblock that also highlights code
Files
Display file structure in your documentation
GitHub Info
Display your GitHub repository information
Graph View
A graph of all pages.
Zoomable Image
Allow zoom-in images in your documentation
Inline TOC
Add Inline TOC into your documentation
Steps
Adding steps to your docs
Tabs
A Tabs component built with Radix UI, with additional features such as persistent and shared value.
Type Table
A table for documenting types
MDX Components
The default MDX components include Cards, Callouts, Code Blocks and Headings.
import defaultMdxComponents from 'fumadocs-ui/mdx';
Relative Link
Server Component only.
To support links with relative file path in href
, override the default a
component with:
import { createRelativeLink } from 'fumadocs-ui/mdx';
import { source } from '@/lib/source';
import { getMDXComponents } from '@/mdx-components';
const page = source.getPage(['...']);
return (
<MdxContent
components={getMDXComponents({
// override the `a` tag
a: createRelativeLink(source, page),
})}
/>
);
[My Link](./file.mdx)
这篇文章怎么样?
Last updated on