Components
Additional components to improve your docs
Overview
Additional components that you can use:
Category: Documentation
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)Example: ../../(integrations)/feedback.mdx