Introduction
Fumadocs v13 has released. It aims to fix the CSS pollution problem and remove deprecated APIs.
New Features
Better Code Blocks
Supported to keep the original background generated by Shiki on CodeBlock
component.
Callout
Callout is now a default MDX component, you can use it in MDX files without an import, or manually adding it to MDX components.
New Headless TOC
The headless component of Table of Contents (TOC) now separated the scroll container provider.
The anchor provider can be placed anywhere.
Opt-out of Container
Supported to disable the default container styles of Tailwind CSS added by Fumadocs UI.
Admonition Syntax
In Docusaurus, there's an Admonition syntax.
For people migrating from Docusaurus, you can enable the new remark plugin to support the Admonition syntax.
See Remark Admonition.
Breaking Changes
Prefix to colors, animations, and utilities
Previously, the Tailwind CSS plugin of Fumadocs UI adds colors (including primary
, secondary
) which conflicts with Shadcn UI and other design systems.
A fd-
prefix is added to them to allow the flexibility to have a separated design system on docs.
To use the Fumadocs UI colors on your primary app, enable the addGlobalColors
option.
This adds the colors without the fd-
prefix.
Or you can just reference them with the fd-
prefix, like bg-fd-background
.
Tailwind CSS Plugin ESM-only
Since Tailwind CSS supported TypeScript configuration, it makes sense to migrate the entire plugin to ESM.
Use ESM syntax in your configuration.
Remove RollButton
component
RollButton
was introduced because there were no "Table Of Contents" on mobile viewports.
Now users can use the TOC Popover to switch between headings, it is no longer a suitable design for Fumadocs UI.
You may copy the last implementation of RollButton
.
Better i18n
Now the I18nProvider
component requires the locale
prop instead of parsing it from pathname.
This fixed some bugs with the I18n middleware.
We also changed the usage of translations
to reduce extra translations loaded on client side.
You have to pass the active translations directly.
locales
is passed as the available options on the Language Select component.
Code Block Usage
The previous usage was confusing, some props are passed directly to pre
while some are not.
With v13, pass all props to the CodeBlock
component.
This also includes class names, you may change your custom styles if necessary.
Remove Deprecated APIs
- Remove deprecated
fumadocs-ui/components/api
components. - Replace
secondary
link items withicon
link items. - Rename
id
prop on Tabs component togroupId
.
Bug Fixes
UI
- Fixed empty folder animation problems caused by Radix UI.
Written by
Fuma Nama
At
Sun Jul 28 2024