# Callout

> Highlight important information with contextual callout boxes for tip, info, warning, and error messages.

The Callout component draws attention to important information using a styled
`<aside>` with `role="note"`. Four variants are available --- tip, info,
warning, and error --- each with distinct styling.

## Markdown syntax

In MDX and markdown files, use the `:::` container directive syntax instead of
importing the component directly. See
[markdown extensions](https://anucybernetics.github.io/astro-theme-university/docs/guides/markdown-extensions#callouts) for the full
syntax and live examples.

## Component syntax

You can also use the Callout component directly:

```astro
---
import Callout from "astro-theme-university/components/Callout.astro";
---
```

### Props

<PropsTable component="components/Callout" />

The component also accepts a default slot for its content.

### Examples

<Example label="Tip callout">
  <Callout type="tip">
    This is a tip callout. Use it for helpful suggestions or best practices.
  </Callout>
</Example>

<Example label="Info callout (default)">
  <Callout>
    This is an informational callout. Use it to surface helpful context or
    supplementary details.
  </Callout>
</Example>

<Example label="Warning callout">
  <Callout type="warning">
    This is a warning callout. Use it when something needs the reader's
    attention before proceeding.
  </Callout>
</Example>

<Example label="Error callout">
  <Callout type="error">
    This is an error callout. Use it to flag critical issues or breaking
    changes.
  </Callout>
</Example>

## Notes

Screen readers treat the callout as supplementary content. Keep callout text
concise --- multi-paragraph content probably belongs in the main body instead.
