Skip to content

Admonition plugin syntax

Admonitions (often referred to as callouts) in Obsidian allow users to create distinct, styled content blocks to highlight information^[200-學習OB__000-obsidian.md]. This syntax supports standard markdown formatting, including bold text, [[Internal links|wikilinks]], file embeds, and images^[200-學習OB__000-obsidian.md].

The specific visual style of an admonition is determined by its type (e.g., note, warning, info), which dictates the associated icon and color theme^[200-學習OB__000-obsidian.md].

Callout Types

There are numerous available types, each serving a specific semantic purpose^[200-學習OB__000-obsidian.md]:

  • Note (General note)
  • Abstract / Summary / Tldr (Summaries)
  • Info / Todo (Information or tasks)
  • Tip / Hint / Important (Helpful suggestions)
  • Success / Check / Done (Completed states)
  • Question / Help / Faq (Questions and answers)
  • Warning / Caution / Attention (Warnings)
  • Failure / Fail / Missing (Failures)
  • Danger / Error (Critical errors)
  • Bug (Software bugs)
  • Example (Examples)
  • Quote / Cite (Quotes)

Syntax Variations

The functionality can be accessed via two main syntax formats: the native Callout syntax and the Admonition plugin syntax.

Native Callout Syntax

The native syntax creates a blockquote that is parsed into a callout^[200-學習OB__000-obsidian.md]. It starts with a blockquote (>), followed by the type identifier enclosed in square brackets.

> [!INFO] Title Here
> Content goes here. It supports **markdown** and links.

Admonition plugin Syntax

The specific Admonition plugin utilizes a code block syntax, offering more granular control over the element's properties^[200-學習OB__000-obsidian.md]. This format is particularly useful for collapsible sections or custom styling.

Structure:

```ad-<type>
title: <Admonition Title>
collapse: <open/close/none>
icon: <icon-name>
color: <hex-color>

Content text goes here.
```
  • type: The identifier for the callout (e.g., note, warning).
  • title: Sets a custom title for the box.
  • collapse: Determines if the block is collapsible.
  • icon: Overrides the default icon.
  • color: Overrides the default color with a specific hex code^[200-學習OB__000-obsidian.md].

Sources

^[200-學習OB__000-obsidian.md]