Skip to content

Callout

Five semantic notice variants with a tinted background and accent bar.

A callout surfaces a notice next to your prose. Each type maps to a semantic token (--cpd-info, --cpd-warning, …) that drives the accent bar, the color-mix background tint and the default icon.

All five types

Note

Additional context that helps the reader.

Warning

Something needs attention before you continue.

Error

The operation failed. Retry after fixing the cause.

Success

The operation completed successfully.

Idea

A cleaner way to approach this.
callout('Additional context that helps the reader.', { type: 'info', title: 'Note' });
callout('Something needs attention before you continue.', { type: 'warning', title: 'Warning' });
callout('The operation failed. Retry after fixing the cause.', { type: 'error', title: 'Error' });
callout('The operation completed successfully.', { type: 'success', title: 'Success' });
callout('A cleaner way to approach this.', { type: 'idea', title: 'Idea' });
Title vs. no title
A titled callout — the bold heading sits above the body.
A bare callout with no title, default info type.
callout('A titled callout — the bold heading sits above the body.', { title: 'Heads up' });
callout(`A bare callout with no title, default ${code('info')} type.`);
Replaced icon

Custom icon

The default icon is replaced by a custom SVG.
callout('The default icon is replaced by a custom SVG.', {
type: 'warning',
title: 'Custom icon',
icon: '<svg …>…</svg>', // any inline SVG string
});
OptionTypeDefaultDescription
contentstringBody text (required, first argument).
type'info' | 'warning' | 'error' | 'success' | 'idea''info'Semantic variant — drives accent bar, tint and icon.
titlestring''Optional bold title above the body.
iconstringautoRaw SVG string replacing the default icon.
  • Markdown passed inside content is escaped; use plain text or pre-built HTML.
  • The tint uses color-mix(in oklab, var(--cpd-<type>) 10%, transparent) — one semantic token per variant, matching Plumest.