@md-parser/react
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Markdown AST to React Node

This package provides a utility for converting Markdown AST nodes to React nodes. It exports two components: MarkdownRenderer and MarkdownASTRenderer, as well as a set of types.

Installation

npm install @md-parser/react

```sh
yarn add @md-parser/react

Usage

Define components

See the components defined in the examples

import { MarkdownRenderer } from '@md-parser/react';
import { components } from './components';

export const Markdown = ({ markdown }: { markdown: string }) => (
  <MarkdownRenderer components={components}>{markdown}</MarkdownRenderer>;
)

Readme

Keywords

none

Package Sidebar

Install

npm i @md-parser/react

Weekly Downloads

466

Version

1.0.3

License

MIT

Unpacked Size

9.59 kB

Total Files

4

Last publish

Collaborators

  • arnestaphorsius
  • saartje87
  • dillonparfitt