The callout/alert component is used to highlight important information.
typesoft (default)infowarningsuccessdangertitleshowIcontrue, showing the icon matching type unless a custom icon snippet is given. Set to false to hide the icon entirely.fgtype. If bg is not also set, a matching
background is derived from it.bgtype. If fg is not also set, a matching
text/border color is derived from it.defaulticontype.title<Callout type="soft">This is a soft callout.</Callout>
<Callout type="info">This is an info callout.</Callout>
<Callout type="warning">This is a warning callout.</Callout>
<Callout type="success">This is a success callout.</Callout>
<Callout type="danger">This is a danger callout.</Callout>Each type shows a matching icon by default. Set showIcon=false to hide it.
<Callout type="info" showIcon={false}>This is an info callout without an icon.</Callout><Callout type="info">
{#snippet title()}
<div>This is a title</div>
{/snippet}
This is a callout with a title.
</Callout><Callout type="info">
{#snippet icon()}
<div>👋</div>
{/snippet}
This is a callout with an icon.
</Callout><Callout type="danger">
{#snippet icon()}
<div>⛔️</div>
{/snippet}
{#snippet title()}
<div>This is a title</div>
{/snippet}
This is a callout with an icon and a title.
</Callout><Callout type="info">
{#snippet icon()}
<div>👋</div>
{/snippet}
{#snippet title()}
<div>hi there</div>
{/snippet}
This is a callout with an icon and a title.
</Callout>Use fg and/or bg to go outside the built-in types. Set just
one and a matching pair is derived automatically; set both for full control.
<Callout fg="#7c3aed">Only "fg" is set, "bg" is derived from it.</Callout>
<Callout bg="#d9f2e6">Only "bg" is set, "fg" is derived from it.</Callout>
<Callout fg="#7c3aed" bg="#efe6fc">Both "fg" and "bg" are set explicitly.</Callout><Callout type="info" title="Heads up">
<p>This is the first paragraph of the callout.</p>
<p>This is the second paragraph, to check that the line height and spacing between paragraphs look right.</p>
<p>And a third one, just to be sure it holds up with more content.</p>
</Callout>This is the first paragraph of the callout.
This is the second paragraph, to check that the line height and spacing between paragraphs look right.
And a third one, just to be sure it holds up with more content.