Details
Use native disclosure blocks for optional or advanced content.
Details
Use :::details for optional or advanced content. It renders native <details> and <summary> markup.
1:::details[Advanced notes]{2 theme="glass"3 open="true"4}5These steps are only needed when running from source.6:::
Attributes
| Attribute | Type | Default | Summary |
|---|---|---|---|
text | Details | Summary text, preferred for new Markdown. | |
text | Details | Summary text retained for existing Markdown. | |
boolean | false | Use open="true" to render initially open. | |
string | default | Details theme name. | |
palette | Colour palette for the surface, border and links (see Palettes). |
Native Behavior
The directive uses browser-native disclosure behavior. It does not require client-side hydration.
Markdown Content
1:::details[Install from source]21. Clone the repository.32. Install dependencies.43. Run:5 6```bash7pnpm build8```9:::
Good Uses
- migration notes that only apply to older versions
- advanced configuration branches
- long generated examples
- caveats that should be available without interrupting a quick-start flow
Themes
Built-in details themes:
defaultmutedglass