Skip to content
Documentation

Markdown and MDX component reference

Look up the Markdown formatting, callouts, components, math, and diagrams Nibleaf supports, with the attributes each component accepts.

  • 4 min read
  • Updated

Every Nibleaf page is stored as Markdown, a plain-text format where symbols add formatting, such as **bold**. MDX adds components, written like HTML tags, for richer layouts such as tabs and cards. The visual editor writes this for you. Use this reference when you choose Edit as Markdown (advanced) in the editor.

Always check your changes in Preview. Text that is valid Markdown can still look different from what you expected.

Nibleaf supports standard Markdown and the GitHub extensions: headings, bold, italics, links, images, quotes, lists, task lists, tables, strikethrough, inline code, and code blocks.

  • Set the page title in the editor's title field, not with a # heading. Start sections at ## and don't skip levels.
  • Add a language to each code block so it is highlighted correctly. You can also add a title:
md
```bash title="Start Nibleaf"
docker compose -f docker-compose.prod.yml up -d
```

Callouts highlight a note, tip, or warning. The GitHub style works in both the visual editor and Markdown:

md
> [!WARNING]
> Back up Postgres and object storage before an upgrade.

The supported types are NOTE, TIP, CHECK, WARNING, CAUTION (shown as danger), and IMPORTANT (shown as info). You can also write <Note>, <Tip>, <Check>, <Warning>, <Danger>, or <Callout type="warning">.

ComponentUse it forAttributes
Card, CardGroupLinks to related pages, shown as cardscard title, href, icon; group cols
Steps, StepNumbered proceduresstep title
Tabs, TabAlternatives, such as one tab per operating systemtab title
Accordion, AccordionGroupOptional detail that readers can expandtitle, defaultOpen
ExpandableNested detail, often inside API fieldstitle, defaultOpen
Columns, ColumnSide-by-side contentnone
FrameAn image or video with a captioncaption
BannerA highlighted messagetype
UpdateA changelog entrylabel, description
CodeGroupSeveral code blocks shown as tabseach code block's language becomes its tab label
ParamField, ResponseFieldAPI parameters and response fieldsname, type, required, default, deprecated; ParamField also accepts path, query, header, body
ApiExample, RequestExample, ResponseExampleA request and its responsetitle; response status
FileTree, Folder, FileA drawing of a folder structurename; folder defaultOpen; file icon
RelatedContent, RelatedCard"Read next" links at the end of a pagetitle; card description, href, icon

Put each component tag on its own line, and leave a blank line around Markdown inside it:

mdx
<Steps>
  <Step title="Create a backup">

  Run the backup script and record the output files.

  </Step>
</Steps>

A file tree only shows the names you type. It doesn't read real files. API examples and related cards also show only what you write.

Tabs, code groups, accordions, and file trees work with a keyboard. In tabs, the arrow keys move between labels, and they follow the reading direction in Arabic.

ComponentUse it forAttributes
TooltipA short definition shown on hover or focustip
IconA small icon from the built-in seticon or name, color, size
BadgeA small label, such as "Beta"color
ButtonA link styled as a buttonhref, variant (outline for an outlined button)

Example: <Tooltip tip="A plain-language definition">term</Tooltip>.

Don't put required instructions in a tooltip, and don't rely on an icon alone to carry meaning.

  • Math: write inline math between single dollar signs and block math between double dollar signs.
  • Diagrams: write a Mermaid diagram in a code block marked mermaid.

Always explain a diagram's main point in the text too. Some readers can't see diagrams, and search can't read them.

Nibleaf removes scripts, event handlers, and unknown attributes when it shows a page. If a page uses a component that isn't in this reference, the visual editor keeps it exactly as written and lets you edit the content around it. Nibleaf can't promise to display custom components, so check the published page and prefer the components listed here.

Was this page helpful?