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:
Pay attention to the double-colon syntax — it's how Comark identifies components.
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
- Numbered items work too
- 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.
Don't forget to close your components with
:: — otherwise autoClose will handle it for you!