Containers
Use callout boxes for tips, warnings, and important information
Containers
Containers are special callout boxes that help highlight important information.
Basic Syntax
::: type
Content goes here
:::
Container Types
Tip
For helpful suggestions:
::: tip
This is a helpful tip for the reader.
:::
This is a helpful tip for the reader.
Info
For informational notes:
::: info
Here's some additional information.
:::
Here's some additional information.
Warning
For things to be careful about:
::: warning
Be careful with this operation.
:::
Be careful with this operation.
Danger
For critical warnings:
::: danger
This action cannot be undone!
:::
This action cannot be undone!
Note
For general notes:
::: note
A side note for the reader.
:::
A side note for the reader.
Custom Titles
Add a custom title after the type:
::: tip Pro Tip
This container has a custom title.
:::
This container has a custom title.
::: warning Security Notice
Always validate user input!
:::
Always validate user input!
Rich Content
Containers support full Markdown inside:
::: info Features
This blog supports:
- **Markdown** formatting
- `Code` snippets
- [Links](https://example.com)
:::
This blog supports:
- Markdown formatting
Codesnippets- Links
Details (Collapsible)
Create expandable sections:
::: details Click to expand
This content is hidden by default.
You can put lots of content here.
:::
Click to expand
This content is hidden by default.
You can put lots of content here.
Details with Code
::: details View the solution
function solve() {
return 42;
}
:::
View the solution
function solve() {
return 42;
}
Best Practices
- tip - Helpful suggestions, best practices
- info - Background information, context
- warning - Potential issues, things to watch
- danger - Critical errors, data loss risks
- note - General observations
- details - Optional content, long examples
Too many containers can be distracting. Use them sparingly for truly important information.
Quick Reference
| Type | Syntax | Use Case |
|---|---|---|
| tip | tip | Helpful suggestions |
| info | info | Additional information |
| warning | warning | Cautions |
| danger | danger | Critical warnings |
| note | note | Side notes |
| details | details | Collapsible content |
Next: Master Code Blocks for beautiful code snippets.