General
Markdown
A component for rendering markdown content with syntax highlighting and custom components.
Import
Code
Props
Code
Usage
Basic Markdown
Code
With Custom Styling
Code
With Custom Components
Code
Custom components provided via the components
prop will merge with default MDX components,
allowing you to override specific elements while keeping others intact.
Features
- GitHub Flavored Markdown: Full GFM support including tables, strikethrough, and task lists
- Syntax Highlighting: Code blocks with configurable Shiki themes
- Raw HTML Support: Safely renders HTML mixed with markdown
- Custom Components: Override default markdown elements with custom React components
- Prose Styling: Built-in typography styles with dark mode support
Supported Markdown
Headers
Code
Emphasis
Code
Lists
Code
Code
The Markdown component supports both inline code and code blocks with syntax highlighting.
Inline code with backticks:
Code
Code blocks with syntax highlighting:
Code
For advanced syntax highlighting features like line numbers, titles, and line highlighting, see:
- Code Blocks - Markdown code block syntax and features
- Syntax Highlight - React component for syntax highlighting
Links and Images
Code
Tables
Code
Configuration
The Markdown component automatically uses:
- Remark GFM: For GitHub Flavored Markdown features
- Rehype Raw: For HTML support
- Shiki: For syntax highlighting with your configured themes
The Markdown component integrates with Zudoku's syntax highlighting configuration and will use the same themes as configured in your Dev Portal options.
Last modified on