Callout
An aside the reader is meant to stop at — a tip, a warning, a danger.
An aside in one of four flavours. The body is Markdown, so links, code and
lists all work inside one.
Usage
Nothing else is required
The body is Markdown too — links, code and lists all work inside one.
Types
info — the default, for context the page assumes.
tip — something that makes the task easier.
warning — a way to get this wrong.
danger — data loss, or a change that cannot be undone.
API
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
type | info · tip · warning · danger | info | Picks the colour, the icon and the role |
title | string | — | Bold first line; the body follows |
icon | string | per type | Any Iconify name, overriding the default |
Slots
| Slot | What goes in it |
|---|---|
default | The body, as Markdown |
Notes
A danger callout carries role="alert"; the others do not. An alert interrupts
a screen reader mid-sentence, which is right for "this deletes your data" and
wrong for a tip.
Was this page helpful?