---
title: Callout
description: 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.

## Variants

```ts
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' });
```

## With and without title

```ts
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.`);
```

## Custom icon

```ts
callout('The default icon is replaced by a custom SVG.', {
  type: 'warning',
  title: 'Custom icon',
  icon: '<svg …>…</svg>', // any inline SVG string
});
```

## Props

<PropsTable
  labels={{ prop: 'Option', type: 'Type', default: 'Default' }}
  type={{
    content: { type: 'string', required: true, description: 'Body text (first argument).' },
    type: { type: "'info' | 'warning' | 'error' | 'success' | 'idea'", default: "'info'", description: 'Semantic variant — drives accent bar, tint and icon.' },
    title: { type: 'string', default: "''", description: 'Optional bold title above the body.' },
    icon: { type: 'string', default: 'auto', description: 'Raw SVG string replacing the default icon.' },
  }}
/>

## Notes

- 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.
