Skip to main content

Introducing banner

· One min read
Maintainer

docusaurus-plugin-banner adds a simple announcement bar above the Docusaurus navbar.

You provide the content and colors, decide whether it can be dismissed, and give the banner an ID. The plugin remembers that dismissal in localStorage, so a returning reader doesn't have to close the same notice again. Different IDs let you run a later announcement without reviving old ones.

It avoids a theme swizzleswizzleDocusaurus's mechanism for customizing theme components by ejecting or wrapping them in your project. for a common piece of site furniture, while leaving the appearance under your control. Multiple instances are supported, and TypeScript types are included.

The bar at the top of this site is the live example. Read the banner docs or find the package on npm.