CompMD
A Markdown flavor that adds components, data, inputs and layout while staying readable in any plain Markdown renderer.
At a Glance
CompMD code is released under Apache 2.0 and the specification text under CC BY 4.0. No paid plans are published.
Engagement
Available On
Alternatives
Listed Dec 2026
About CompMD
CompMD (Component Markdown) is a Markdown flavor created by Hakan Serce that adds components, containers, slots and layout to CommonMark and GFM. Files use the .comp.md extension and remain readable as text in GitHub, editor previews or any Markdown renderer, where each component shows its fallback text. The project is an early draft, with 0.x versions while the spec is a draft.
What It Is
CompMD extends Markdown for the things it lacks: placing items side by side, showing values from data, and letting the reader change what the page shows. A component is written as a line of its own, such as ::: box, with params in braces. A CompMD processor renders it, and any other Markdown tool shows readable text. The site contrasts this with MDX, which it says turns the document into a program needing a build, and with templates that bury text in markup.
How Documents Work
- Components are defined in CompMD itself, with typed params, a body and named slots the caller fills.
- Data can be read from CSV, JSON or YAML in the frontmatter, then filtered, sorted and summed with expressions in a profile of CEL.
- Inputs are values the reader changes, bound to input components, and the page follows.
- Layout uses grids, rows and stacks that follow the width of their containing box.
- Custom components can be written in JSX, TSX, Svelte or JavaScript and run in a sandbox; code renderers can draw code blocks such as Mermaid diagrams.
Safety Model
The spec states that opening a CompMD document cannot run code in the page, reach the reader's data or call home. Components written in CompMD run no code. Code components run sandboxed with no network, storage or navigation and are stopped if they run too long. Data comes only from allowed origins, text is escaped, raw HTML is limited to safe tags, and expressions run within a work budget.
Using It in an App
Developers add the Vite plugin and the processor, renderer and sandbox packages from npm. The processor is written in Rust and also runs as WebAssembly in the browser, and it processes incrementally so an edit re-processes only the blocks it touches. Rust crates include the processor and a Tauri plugin. A playground, an Author's Guide, a Developer's Guide and the spec are published on the site.
Update: First Packs
A blog post describes an initial set of component packs built with CompMD 0.10.0: card, link-card, gallery, figure, columns, badge, sticky-note, timeline and rating. Eight are written purely in CompMD with no code; rating draws SVG in the sandbox. A planned list also includes tabs, charts, calendars and embeds. The latest GitHub release listed is v0.15.0.
Collections
Popular collections
- Pick Up Where Your Agent Left Off
Collection by @caiovalverde
- UI Design Skills for Coding Agents
Collection by @mayachen
- Find the Ways Your AI App Can Fail Before Launch
Collection by @samirhaddad
- Give Your AI Agent the Meaning Behind Your Database
Collection by @danielokafor
Add CompMD to one of your collections.
Community Discussions
Be the first to start a conversation about CompMD
Share your experience with CompMD, ask questions, or help others learn from your insights.
Pricing
Open Source
CompMD code is released under Apache 2.0 and the specification text under CC BY 4.0. No paid plans are published.
- Code and conformance set: Apache 2.0 (versions before 0.15.0 were MIT)
- Specification text: CC BY 4.0
- Early draft: spec and packages may change in breaking ways before version 1
- Playground available on compmd.dev
Capabilities
Key Features
- Components with typed params and named slots written in Markdown
- Data loading from CSV, JSON and YAML with CEL-based expressions
- Reader-controlled inputs bound to page content
- Responsive grid, row and stack layout
- Custom components in JSX, TSX, Svelte or JavaScript run in a sandbox
- Code renderers such as Mermaid diagrams
- Graceful fallback in plain CommonMark/GFM renderers
- Incremental processing with diagnostics and fixes
- Rust processor that also runs as WebAssembly
- Online playground and conformance test set
- Component packs such as card, gallery, timeline and rating
