@multiplatform.one/markdown
v7.4.1
Published
Cross-platform markdown renderer with Shiki syntax highlighting for React and React Native
Readme
@multiplatform.one/markdown
Cross-platform markdown renderer for React and React Native with MDX component support and Shiki syntax highlighting.
Install
pnpm add @multiplatform.one/markdownRequires react and react-native (or react-native-web) as peers.
What it owns
<Markdown>— renders a markdown string with Tamagui typography- Parser / renderer —
parseMarkdown,renderMarkdown - Shiki highlighting —
highlightCode(re-exported from@multiplatform.one/components, the one canonical highlighter stack) andCodeTheme("auto","github-dark","github-light", …) - MDX building blocks —
Aside,Notice,MdxCodeBlock,Tabs,Table,MarkdownSimpleTable,Li,Ul,Hr,Video, and themdxComponentsmap for MDX pipelines
What it must not do
- No rich-text editing — the editor lives in
@multiplatform.one/rich-text - No app-specific content or Frappe assumptions
Usage
import { Markdown } from "@multiplatform.one/markdown";
const source = `
# Hello
Some **markdown** with highlighted code:
\`\`\`ts
const x: number = 42;
\`\`\`
`;
export function Docs() {
return <Markdown codeTheme="auto">{source}</Markdown>;
}Override individual elements with the components prop
(<Markdown components={{ h1: MyHeading }}>).
Styling
Typography and spacing resolve through the knobs system in
@multiplatform.one/theme (see agent-os/standards/frontend/knobs-system.md
in the multiplatform.one repo).
License
Apache-2.0
