This content is a draft.

This is a custom content notice.

<ContentNotice icon="warning" label="This is a custom content notice." />
View Code

Draft

---
draft: true
---
View Code

Overview

Content notice components display inline alert banners within the page content. There are three variants:

  1. ContentNotice — Base component with customizable icon and label
  2. DraftContentNotice — Pre-configured for draft pages
  3. FallbackContentNotice — Pre-configured for untranslated content

This page is marked as draft: true in its frontmatter, so you should see a draft notice rendered above.

ContentNotice Props

PropTypeDescription
iconstringIcon name to display
labelstringNotice text content

DraftContentNotice

A wrapper around ContentNotice with a warning icon and default "Draft" label.

PropTypeDefaultDescription
labelstring"Draft"Override the default label

Activated automatically by the Page component when draft: true is set in frontmatter:

---
draft: true
---

FallbackContentNotice

A wrapper around ContentNotice with a warning icon for untranslated pages.

PropTypeDefaultDescription
labelstring"This page has not been translated yet."Override the default label

Activated automatically when the isFallback flag is set in RouteData.

Styling

  • .sl-content-notice — Container with flex layout
  • Icon is colored with --sl-color-orange-high
  • Content flows in a row layout using .sl-flex