colors.dark property in your docs.json. You can change the appearance with the type property or override the background entirely with color.
To add a banner, use the banner property in your docs.json:
You can also configure banners per language by setting
banner in navigation.languages. See Language-specific banners.Properties
The text content displayed in the banner. Supports basic MDX formatting including links, bold, and italic text. Custom components are not supported.
Whether users can dismiss the banner. When
true, a close button appears. If a user closes the banner, it stays hidden for them until you update the banner content. Defaults to false.The visual style of the banner. Controls the background color so visitors can quickly recognize the urgency of the message. Defaults to
info.info: Uses the primary brand color. Best for product announcements and general updates.warning: Uses an amber background. Best for cautionary notices like scheduled maintenance or upcoming deprecations.critical: Uses a red background. Best for urgent notices that require immediate attention, such as outages or required actions.
Override the banner background color with a custom hex value. When set, this takes precedence over the color implied by
type. Banner text is white, so choose a background dark enough to remain legible.Language-specific banners
Configure different banner content for each language in your documentation. Define language-specific banners in thenavigation.languages array in your docs.json.
Fallback behavior
Banners follow a priority order when determining which content to display:- Language-specific banner: If the current language has a
bannerconfiguration, it takes priority. - Global banner: If no language-specific banner exists, display the global
banner.