Alert #
Displays a message block with optional title and variant type.
Props #
| Prop | Type | Required | Description |
|---|---|---|---|
type | 'info' | 'warning' | 'success' | 'danger' | No | Visual variant. |
title | string | No | Optional heading line. |
children | ReactNode | No | Alert body content. |
Examples #
Live examples #
Heads up
JSON edits are reflected immediately after page refresh.
Check before deploy
Confirm all sidebar links point to existing pages.
Published
Your docs site deployed successfully.
Build failed
A referenced MDX route is missing. Fix links and redeploy.
Code #
Info (default) #
mdx
<Alert title="Heads up">JSON edits are reflected immediately after page refresh.</Alert>
Warning #
mdx
<Alert type="warning" title="Check before deploy">Confirm all sidebar links point to existing pages.</Alert>
Success #
mdx
<Alert type="success" title="Published">Your docs site deployed successfully.</Alert>
Danger #
mdx
<Alert type="danger" title="Build failed">A referenced MDX route is missing. Fix links and redeploy.</Alert>