← Back to all posts

Comark Syntax Guide

comarksyntaxcomponents

Comark is Components in Markdown — it extends standard Markdown with a powerful component syntax.

Inline formatting

You can use all the usual Markdown formatting: bold, italic, code, and links.

Components

Components use the :: syntax. They can have attributes and children:

Component slots

React components receive default content as children, and named slots as props like slotHeader and slotFooter:

Slot-aware React component
This body is the default slot. It can contain Markdown, links, lists, or any nested Comark content.
Rendered through the slotFooter prop in FeatureCard.tsx.

Lists

Comark handles lists, of course:

  • First item
  • Second item with bold text
  • Third item with inline code
  1. Numbered items work too
  2. With full Markdown support inside

Code blocks

Syntax highlighting works out of the box:

function greet(name) {
  return `Hello, ${name}!`
}

Block quotes

Comark makes Markdown more powerful without sacrificing simplicity.