# Markdown

> Renders Markdown natively, built for large documents.

- Category: [Rich content](https://tarve.dev/docs.md#rich-content)
- Import: `import { Markdown } from "@tarve/core";`
- Props type: `MarkdownProps`
- Source: [packages/core/src/components/rich-content.ts:44](https://github.com/omarcosr/tarve/blob/main/packages/core/src/components/rich-content.ts#L44)

## Usage

```tsx title="Markdown.tsx"
import { Markdown } from "@tarve/core";

const source = [
  "# Release notes",
  "",
  "- **Native** markdown rendering",
  "- Links, lists, tables and `code`",
].join("\n");

<Markdown source={source} onLinkClick={(href) => console.log(href)} />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `source` (required) | `string` | — |  |
| `onLinkClick` | `(href: string) => void` | — | Overrides the default platform URI action for a clicked Markdown link. |

### Inherited from `RichProps`

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `syntaxTheme` | `Partial<SyntaxTheme>` | — | Overrides syntax colours without changing parsing or layout. |

## Common props

Shared by every component (descriptions: https://tarve.dev/docs.md#common-props): `class`, `className`, `highlight`, `id`, `key`, `motionFrom`, `onHighlight`, `onPaste`, `onPointerLeave`, `onPointerMove`, `onSize`, `onTransitionEnd`, `rovingGroup`, `style`.

Previous: [Chart](https://tarve.dev/docs/components/Chart.md) · Next: [Code](https://tarve.dev/docs/components/Code.md)

---

Tarve v0.13.8 · HTML version: https://tarve.dev/docs/components/Markdown · Index for agents: https://tarve.dev/llms.txt
