Skip to content

Commit 3766296

Browse files
Streamline banner component documentation (#1104)
* Update components/banner.mdx * add to docs.json * update frontmatter * copy edit banners * update description --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Ethan Palm <[email protected]>
1 parent a18cfd2 commit 3766296

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

components/banner.mdx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: "Banner"
3+
description: "Add a banner to display important site-wide announcements and notifications"
4+
icon: "layout-panel-top"
5+
---
6+
7+
Use banners to display important announcements, updates, or notifications across your entire documentation site. Banners appear at the top of every page, support Markdown formatting, and can be made dismissible.
8+
9+
To add a banner, use the `banner` property in your `docs.json`:
10+
11+
<CodeGroup>
12+
```json Product announcements wrap
13+
"banner": {
14+
"content": "🚀 Version 2.0 is now live! See our [changelog](/changelog) for details.",
15+
"dismissible": true
16+
}
17+
```
18+
19+
```json Maintenance notices wrap
20+
"banner": {
21+
"content": "⚠️ Scheduled maintenance: API will be unavailable December 15, 2-4 AM UTC",
22+
"dismissible": false
23+
}
24+
```
25+
26+
```json Required actions wrap
27+
"banner": {
28+
"content": "**Action required:** Migrate to our new version by January 1. [Migration guide](/migration)",
29+
"dismissible": true
30+
}
31+
```
32+
</CodeGroup>
33+
34+
## Properties
35+
36+
<ResponseField name="content" type="string" required>
37+
The banner message. Supports plain text and Markdown formatting.
38+
</ResponseField>
39+
40+
<ResponseField name="dismissible" type="boolean">
41+
Whether users can dismiss the banner. When `true`, users can close the banner and it won't reappear for their session. Defaults to `false`.
42+
</ResponseField>

docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
"components/steps",
8888
"components/tabs",
8989
"components/tooltips",
90-
"components/update"
90+
"components/update",
91+
"components/banner"
9192
]
9293
},
9394
{

0 commit comments

Comments
 (0)