@mdx-js/tag
A fully-featured Markdown/MDX React component for ambitious projects
Last updated 6 years ago by johno .
MIT · Repository · Bugs · Original npm
$ cnpm install @mdx-js/tag 
SYNC missed versions from official npm registry.

@mdx-js/tag

Build Status lerna Join the community on Spectrum

Map components to HTML elements based on the Markdown syntax. Useful with MDX.

Installation

npm:

npm i -S @mdx-js/tag

Usage

import React from 'react'
import {renderToString} from 'react-dom/server'
import {MDXTag} from '@mdx/tag'

const H1 = props => <h1 style={{color: 'tomato'}} {...props} />

console.log(renderToString(<MDXTag name="h1" children="Hello, world!" />))
console.log(renderToString(<MDXTag name="h1" components={{h1: H1}} children="Hello, world!" />))

Yields:

<h1>Hello, world!</h1>
<h1 style="color:tomato">Hello, world!</h1>

Contribute

See contributing.md in mdx-js/mdx for ways to get started.

This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.

License

MIT © Compositor and ZEIT

Current Tags

  • 0.20.3                                ...           latest (6 years ago)
  • 1.0.0-alpha.6                                ...           next (6 years ago)

5 Versions

  • 0.16.8                                ...           7 years ago
  • 0.7.2                                ...           7 years ago
  • 1.0.0-alpha.6                                ...           6 years ago
  • 0.20.3                                ...           6 years ago
  • 0.15.6                                ...           7 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (8)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org