Markdown

Renders Markdown natively, built for large documents.

Import

import { Markdown } from "@tarve/core";

Usage

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

PropTypeDefault
source required string—
onLinkClick

Overrides the default platform URI action for a clicked Markdown link.

(href: string) => void—
Inherited from RichProps 1 props
PropTypeDefault
syntaxTheme

Overrides syntax colours without changing parsing or layout.

Partial<SyntaxTheme>—

Common props

Shared by every component. See descriptions →

highlightidkeymotionFromonHighlightonPasteonTransitionEndrovingGroupstyle