Banner
Add a banner to your site
Add a banner to your site
import { Banner } from 'fumadocs-ui/components/banner';
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}): React.ReactElement {
return (
<html lang="en">
<body>
<Banner>Hello World</Banner>
Change the default variant.
import { Banner }
rainbow variantBy default, the banner uses a style tag to modify Fumadocs layouts (e.g. reduce the sidebar height).
You can disable it with:
import { Banner }
To allow users to close the banner, give the banner an ID.
import { Banner }
The state will be automatically persisted.