For AI agents: the complete documentation index is available at https://lazygophers.github.io/pamphlet/en/llms.txt, the full documentation bundle is available at https://lazygophers.github.io/pamphlet/en/llms-full.txt, and this page is available as Markdown at https://lazygophers.github.io/pamphlet/en/write/components/index.md.

How directives work

Five things that can be clicked or that step out of the prose, collectively container directives. They are what Pamphlet adds on top of standard Markdown.

DirectiveWhat it does
info tip warn dangerFour kinds of callout
tabs / tabTabbed panels
collapseCollapsible block
stepsNumbered steps
revealReveal on scroll

One rule

:::name[directive label]{attributes}
  • [directive label] is always the words your reader sees
  • {attributes} are always parameters for the compiler

That is the whole rule; there is nothing to memorise per directive.

"Directive label" and "heading" are different things

In this project a heading is Markdown's # (see Headings). The text in square brackets is always called the directive label — the diagnostics say so too.

All of them are container directives

Every directive name must wrap its content in paired colons. The single-line form ::name[content] reports DIR-202.

Nesting needs more colons on the outside

The most common mistake

:::tabs around :::tab does not work — with equal colons, the first ::: closes the outer one.

Write ::::tabs around :::tab: four colons outside, three inside.

Typos are survivable

The diagnostics recognise other tools' spellings:

You wroteThe hint
noteIt is info in Pamphlet
warning / cautionIt is warn
importantIt is danger
details / accordionIt is collapse
tabsetIt is tabs

Typos within an edit distance of 2 get a "did you mean X?".

An unknown directive is only a DIR-201 warning, because the content is still emitted as-is — nothing is lost.

Unknown attributes are ignored

An attribute the directive does not know reports DIR-207 and lists the ones it does know.

Warning

class and id do nothing today The directive syntax allows {.myclass} and {#myid}, and Pamphlet does not warn about them — but they are not emitted either; the values are dropped silently.

To change styling, use theme tokens.