# @comark/react
[](https://npmx.dev/@comark/react)
[](https://npm.chart.dev/@comark/react)
[](https://github.com/comarkdown/comark/actions/workflows/ci.yml)
[](https://comark.dev/rendering/react)
[](https://github.com/comarkdown/comark/blob/main/LICENSE)
React renderer for [Comark](https://comark.dev). Render markdown with custom React components, streaming support, and Server Components.
## Features
- 🧩 `` component for one-shot markdown rendering
- 🎯 Map any Comark tag to a custom React component
- 🌊 Streaming-friendly with auto-close and caret support
- 🖥️ Works with React Server Components and SSR
- 🔌 Plugin ecosystem (math, mermaid, highlight, binding…)
- 🎯 Full TypeScript support
## Installation
```bash
npm install @comark/react
# or
pnpm add @comark/react
```
## Usage
```tsx
import { Markdown } from '@comark/react'
import math, { Math } from '@comark/react/plugins/math'
const content = `# Hello\n\nThis is **Comark** in React.`
export default function App() {
return (
{content}
)
}
```
### Custom components
```tsx
import { Markdown } from '@comark/react'
import { Alert } from './components/Alert'
{content}
```
```mdc
::alert{type="warning"}
Heads up!
::
```
### Streaming
Streaming reuses completed blocks as text is appended. Keep parser options and plugins stable between updates. Set `streaming` to `false` when the stream ends to parse the complete document.
```tsx
{content}
```
## Documentation
Full guide and API reference at [comark.dev/rendering/react](https://comark.dev/rendering/react).
## License
Made with ❤️
Published under [MIT License](https://github.com/comarkdown/comark/blob/main/LICENSE).