Skip to content

Commit 03c5bbe

Browse files
docs: update banner frontmatter property documentation
Replace beta banner documentation with comprehensive banner property docs: - Simple usage: banner: true or banner: "message" - Advanced usage with intents (info, warning, success, error, note, launch, tip, check) - Custom color overrides with examples - Plant-themed examples per documentation guidelines - Mark beta property as deprecated with migration guidance Co-Authored-By: Deep Singhvi <[email protected]>
1 parent 15fb6c0 commit 03c5bbe

File tree

1 file changed

+64
-9
lines changed

1 file changed

+64
-9
lines changed

fern/products/docs/pages/customization/frontmatter.mdx

Lines changed: 64 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,29 +213,84 @@ hide-feedback: true
213213
<img src="./on-page-feedback.png" alt="Leave feedback feature" />
214214
</Frame>
215215

216-
## Beta banner
217-
<ParamField path="beta" type="boolean | string" required={false} default={false}>
218-
Displays a yellow warning banner at the top of the page to indicate that the content is in beta or still being worked on. Set to `true` for a default message, or provide a custom message string.
216+
## Banner
217+
<ParamField path="banner" type="boolean | string | object" required={false}>
218+
Displays a banner at the top of the page content. Can be set to `true` for a default warning banner, a string for a warning banner with custom message, or an object for full customization with different intents and colors.
219219
</ParamField>
220220

221-
<CodeBlock title="Example beta banner with default message">
221+
### Simple usage
222+
223+
<CodeBlock title="Default warning banner">
224+
```mdx
225+
---
226+
title: New Plant Species Guide
227+
banner: true
228+
---
229+
```
230+
</CodeBlock>
231+
232+
<CodeBlock title="Custom message">
233+
```mdx
234+
---
235+
title: Experimental Plant Care API
236+
banner: This plant care API is experimental and may change without notice.
237+
---
238+
```
239+
</CodeBlock>
240+
241+
### Advanced usage with intents
242+
243+
<CodeBlock title="Info banner">
244+
```mdx
245+
---
246+
title: Plant Database Migration
247+
banner:
248+
message: We're migrating to a new plant database. Some features may be temporarily unavailable.
249+
intent: info
250+
---
251+
```
252+
</CodeBlock>
253+
254+
<CodeBlock title="Success banner">
222255
```mdx
223256
---
224-
title: New Feature Documentation
225-
beta: true
257+
title: New Plant Identification Feature
258+
banner:
259+
message: Our new AI-powered plant identification feature is now available!
260+
intent: success
226261
---
227262
```
228263
</CodeBlock>
229264

230-
<CodeBlock title="Example beta banner with custom message">
265+
Available intents: `info`, `warning`, `success`, `error`, `note`, `launch`, `tip`, `check`
266+
267+
### Custom colors
268+
269+
<CodeBlock title="Banner with custom colors">
231270
```mdx
232271
---
233-
title: Experimental API
234-
beta: This API is experimental and may change without notice.
272+
title: Seasonal Plant Guide
273+
banner:
274+
message: Spring planting season has begun! Check out our seasonal recommendations.
275+
intent: tip
276+
color:
277+
background: "#e8f5e9"
278+
text: "#1b5e20"
279+
border: "#4caf50"
235280
---
236281
```
237282
</CodeBlock>
238283

284+
<Warning>
285+
Custom colors may not adapt well to dark mode. Use with caution and test in both light and dark themes.
286+
</Warning>
287+
288+
### Deprecated: beta property
289+
290+
<ParamField path="beta" type="boolean | string" required={false} default={false}>
291+
**Deprecated.** Use `banner` instead. Displays a yellow warning banner at the top of the page to indicate that the content is in beta or still being worked on.
292+
</ParamField>
293+
239294
## Page logo
240295
<ParamField path="logo" type="object" required={false}>
241296
Override the site-wide logo for a page. Specify different logos for light and dark modes using absolute URLs.

0 commit comments

Comments
 (0)