Skip to main content

Callout

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 for the full syntax and live examples.

Component syntax

You can also use the Callout component directly:

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

Props

Prop Type Default Description
type "info" | "tip" | "warning" | "error" "info" The visual style and semantic meaning of the callout.

The component also accepts a default slot for its content.

Examples

Tip callout

Info callout (default)

Warning callout

Error callout

Notes

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