Skip to content
mdxcn is now part of Shadcn Labs. details

grammar

markdown

Every component reads the same handful of Markdown rules, so once you know them you can write any graph. Bold marks what's current, italics mark what's next, label: value makes a row, and — note adds a side note.

rules

Write Markdown inside the tag and the component reads it as data. The muted line under each rule lists the components that use it.

[ GRAMMAR ]
**bold**
now, chosen, the total, the row to read. Gets the accent.
Timeline, Steps, Board, Decision, Diff, Spec, Stat, Score, Keys, Faq, Tree, Calendar (today), Env (required)
*italic*
next, rejected, an aside. Recedes.
Timeline, Steps, Board, Decision, Chat
- label: value
one row. The label is everything before the first : .
Spec, Timeline, Diff, Bullet, Slope, Score, Keys, Chat, Changelog, Calendar, Activity, Plot
x — note
a side note, a reason, or a caption. Muted, under or after the item.
Check, Tree, Stat, Timeline, Board, Decision, Env, Meter, Waffle, Spark, KPI, Timer, Countdown
a → b → c
a path. -> works too.
Flow, Slope
- [x] done
a box. [ ] is open.
Check
nested list
children: sub-tasks, folders.
Tree, Check
blank line + indented paragraph
the item's body. Leave blank lines between items, indent the paragraph.
Steps, Timeline, Spec, Chat
### heading
a section, a column, or a question.
Sheet, Board, Faq
| table |
data. A last row in **bold** or starting Total is the footer.
Table, Sheet, Compare, Matrix, Heatmap, Invoice, Endpoint
```fence
raw lines. The language becomes the title where it helps.
Terminal, Annotate, Env, Endpoint
code // (1)
a marker. Item 1 of the ordered list after the fence explains it.
Annotate
~~old~~ new
a rewrite: one removed line, one added line.
Diff
ok*40
a run: forty of them. Works in any list of values.
Uptime, Activity, Spark, Plot, KPI, Bars

every host

The same list works everywhere: as MDX children, as the body of a Comark block, and as the body of a Knap content filter. It also produces the same plain-text figure for GitHub.

[ NIGHT ]
  1. 14:02p95 crossed 800ms
    paged the on-call
  2. 14:11rolled back the cache flag
  3. 14:40write the postmortem

page.mdx

comark

readme.md

upgrades

With withMdxcn, some plain Markdown that GitHub already understands, like alerts, quotes and footnotes, gets drawn in a frame on your site.

[ UPGRADES ]
> [!WARNING]
Callout. NOTE, TIP, IMPORTANT, WARNING, CAUTION, and the Obsidian names. Text after the marker is the title.
withMdxcn → Callout
> … \n> — Name, Where
Quote. The last line starts with an em dash; the comma splits name and source.
withMdxcn → Quote
```console
Terminal. Also sh / bash / zsh fences that have $ prompts.
withMdxcn → Terminal
text[^1]
Footnotes. The GFM section at the end of the page gets a frame.
withMdxcn → Footnotes