# Callout

Use Markdown alerts or the `Callout` component to draw attention to a message.

## Usage

Use GitHub-style alerts in Markdown or MDX:

```md
> [!WARNING]
> Review your changes before applying them.
```

Supported markers are `[!NOTE]`, `[!TIP]`, `[!IMPORTANT]`, `[!WARNING]`, and `[!CAUTION]`. Place the marker on its own first line.

In MDX, use `Callout` for a custom title, icon, color, or action:

```tsx
<Callout title="Good to know">
  Keep normal docs pages as Markdown. Use MDX when you need components.
</Callout>
```

Set a custom Lucide icon with `icon` when the message benefits from one:

```tsx
<Callout icon="sparkles" color="violet" title="Custom icon">
  Use a Tailwind color family and a Lucide icon name.
</Callout>
```

## Options

| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `type` | `"warning"` \| `"important"` \| `"destructive"` | `undefined` | Optional severity variant. |
| `color` | `string` | `undefined` | Tailwind color family, such as `blue` or `purple`. Uses shade 700 in light mode and 400 in dark mode. Overrides `type` color. |
| `title` | `string` | `"Note"` | Heading displayed in the alert. |
| `icon` | `string` | `undefined` | Optional Lucide icon name or custom SVG. |
| `action` | `{ label: string; href: string }` | `undefined` | Optional callout action link. |
| `class` | `string` | `""` | Extra classes applied to the alert root. |

## Examples

### Neutral

```mdx
<Callout title="Neutral">
  Use a callout when the surrounding paragraph is not enough.
</Callout>
```

### Custom icon

```mdx
<Callout icon="lightbulb" color="violet" title="Custom icon">
  Add a Lucide icon when it helps explain the message.
</Callout>
```

### Action

```mdx
<Callout title="Template macros available" icon="code" action={{ label: "More", href: "#" }}>
  This component ships an optional action link for related documentation.
</Callout>
```

### Warning

```mdx
<Callout type="warning" title="Warning">
  Avoid putting app-only imports in reusable documentation examples.
</Callout>
```

### Destructive

```mdx
<Callout type="destructive" title="Destructive">
  This variant is for irreversible actions, security risks, or migration warnings.
</Callout>
```

### Markdown alerts

> [!NOTE]
> Use alerts for information readers should notice.

> [!TIP]
> Keep the message short and actionable.

> [!IMPORTANT]
> Complete the required setup before continuing.

> [!WARNING]
> Review your changes before applying them.

> [!CAUTION]
> Deleting data cannot be undone.
