MDC Syntax Logo
Getting Started

Introduction

MDC Syntax is a powerful Markdown parser that extends standard Markdown with component syntax, enabling rich, interactive content in Vue and React applications.

What is MDC?

MDC stands for MarkDown Components. It's a syntax extension that lets you use components directly inside your Markdown content:

# Welcome to My Blog

This is regular **markdown** with a custom component:

::alert{type="warning"}
This is an important message!
::

MDC Syntax parses this into an AST that can be rendered by Vue or React, turning your Markdown into fully interactive content.

Key Features

Fast Parsing

Optimized parser that handles large documents efficiently with minimal memory usage.

Component Syntax

Embed custom components in Markdown with props, slots, and nested children.

Streaming Support

Real-time incremental parsing for AI chat interfaces and live content.

Framework Agnostic

First-class support for both Vue and React with dedicated renderers.

Syntax Highlighting

Built-in Shiki integration for beautiful code blocks with theme support.

GFM Support

Full GitHub Flavored Markdown support including tables, task lists, and more.

Quick Example

Here's how simple it is to render MDC content:

<script setup>
import { MDC } from 'mdc-syntax/vue'

const content = `
# Hello World

::alert{type="info"}
Welcome to MDC Syntax!
::
`
</script>

<template>
  <MDC :markdown="content" />
</template>

When to Use MDC Syntax

MDC Syntax is ideal for:

  • Documentation sites - Write docs in Markdown with interactive examples
  • Blog platforms - Rich content with custom components for callouts, embeds, and more
  • AI chat interfaces - Stream and render Markdown responses in real-time
  • CMS integrations - Let content editors use components without touching code
  • Technical writing - Combine prose with live code examples and diagrams

How It Works

graph LR
    A[Markdown + MDC] --> B[Parser]
    B --> C[Minimark AST]
    C --> D{Renderer}
    D --> E[Vue]
    D --> F[React]
    D --> G[HTML]
  1. Parse - MDC Syntax parses your content into a compact Minimark AST
  2. Transform - The AST can be manipulated, cached, or serialized
  3. Render - Framework-specific renderers convert the AST to Vue or React components

Comparison with Other Tools

FeatureMDC SyntaxMDXMarkdoc
Streaming support
Vue support
React support
No build step
Compact AST
Auto-close for streams

Next Steps

Ready to get started? Follow these guides:

Installation

Install MDC Syntax in your project

MDC Syntax

Learn the component syntax

Vue Rendering

Render MDC in Vue applications

React Rendering

Render MDC in React applications