A minimal example showing how to use Comark with React and Vite.
App.tsx
import { Comark } from '@comark/react'
import Alert from './components/Alert'

const markdown = `
# Hello *World*

::alert{type="info"}
This is an alert!
::
`

export default function App() {
  return (
    <Comark components={{ Alert }}>
      {markdown}
    </Comark>
  )
}

This example demonstrates the simplest way to use Comark with React - use the Comark component and pass it markdown content. The component handles parsing and rendering automatically.

Copyright © 2026