Admonitions¶
What it is¶
Void styles the standard MkDocs admonition extension, plus collapsible
??? (details) blocks and inline variants. Every type maps to a themed accent
color and a small icon in the title.
When to use it¶
Use admonitions for short, self-contained callouts that deserve visual weight
β a warning, a tip, a takeaway, a caution. Keep them short; if the content runs
longer than a few sentences, it probably belongs in prose instead. Prefer
collapsible details when the extra context is optional, and reserve inline
for tiny asides that should float beside text.
In Markdown¶
Admonitions are plain Markdown. The type keyword follows !!! and the body is
indented:
??? renders a collapsible block, closed by default. Append + to default it
to open:
The inline class floats the block beside content:
Configuration¶
Admonitions come from the Markdown extensions, already enabled in the theme:
To switch the visual layer off site-wide, use the theme option. Custom types stay available via CSS regardless:
Live preview / screenshot¶
Note / Info / Example¶
Note
A generic note.
Custom title
Custom titles are supported.
Example
An example block.
Abstract / Summary / TLDR¶
Summary
A condensed takeaway.
Tip / Hint / Question / FAQ¶
Tip
A helpful tip.
Question
A question worth asking.
Success / Done / Check¶
Success
Everything worked.
Warning / Caution / Attention¶
Warning
Watch out.
Danger / Error / Failure / Bug / Important¶
Danger
This is destructive.
Bug
Known defect.
Important
Really important requirement.
Quote¶
Quote
"Less, but better." β Dieter Rams
Collapsible (details)¶
Expand me
Hidden until expanded.
Danger
Open by default and collapsible.
Inline¶
Note
Floats to the left in this layout.
Paragraph text that wraps around the inline admonition demonstrates the floating behavior. Copy continues to flow around the floated box, letting you place short callouts against prose without breaking the reading flow.
Under the hood¶
- Markdown output is the standard
<aside class="admonition note">/ details markup; Void restyles it incomponents.scssand wires the type color + icon through the--void-iconpassword-color token. - The active type's title bar and icon read from
theme.void.admonitions.types(color/iconper type) β empty values fall back to the built-in palette. - Disabling the component sets
data-md-void-admonitions="false"on the root element, which stops the icon/color layer without touching the underlying extension output.
Accessibility notes¶
- The type is conveyed by both color and an icon, and the title text names the kind ("Warning:", "Danger:"), so meaning never relies on color alone.
- Collapsible blocks are native
<details>/<summary>elements β keyboard focus and toggling work without custom scripting. - Keep body text at normal contrast; the accent-colored title is a label, not body copy.