# @mdx-js/tag

> A fully-featured Markdown/MDX React component for ambitious projects

Latest version **0.20.3** (published 2019-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mdx-js/tag
pnpm add @mdx-js/tag
yarn add @mdx-js/tag
bun add @mdx-js/tag
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.20.3 |
| Published | 2019-03-06 |
| First published | 2018-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19789 |
| Author | John Otander |
| Maintainers | johno, johno-bot, silvenon, timneutkens |
| Keywords | mdx, markdown, react, jsx, remark, mdxast |

## Links

- npm: https://www.npmjs.com/package/@mdx-js/tag
- Repository: https://github.com/mdx-js/mdx
- Homepage: https://mdxjs.com/
- Issues: https://github.com/mdx-js/mdx/issues
- npm.io page: https://npm.io/package/@mdx-js/tag

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.20.3 (latest) — 2019-03-06
- 1.0.0-alpha.6 (next) — 2019-03-11
- 1.0.0-alpha.5 — 2019-03-08
- 1.0.0-alpha.2 — 2019-03-08
- 1.0.0-alpha.1 — 2019-03-06
- 1.0.0-alpha.0 — 2019-03-06
- 0.18.0 — 2019-02-25
- 0.17.5 — 2019-02-15
- 0.17.0 — 2019-02-11
- 0.16.8 — 2019-01-24
- 0.16.6 — 2018-12-08
- 0.16.1 — 2018-11-20
- 0.16.0 — 2018-11-05
- 0.15.6 — 2018-10-30
- 0.15.0 — 2018-08-10
- … 18 more at https://npm.io/package/@mdx-js/tag/versions

## README

# `@mdx-js/tag`

[![Build Status][build-badge]][build]
[![lerna][lerna-badge]][lerna]
[![Join the community on Spectrum][spectrum-badge]][spectrum]

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

## Installation

[npm][]:

```sh
npm i -S @mdx-js/tag
```

## Usage

```jsx
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:

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

## Contribute

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

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

## License

[MIT][] © [Compositor][] and [ZEIT][]

<!-- Definitions -->

[build]: https://travis-ci.org/mdx-js/mdx

[build-badge]: https://travis-ci.org/mdx-js/mdx.svg?branch=master

[lerna]: https://lernajs.io/

[lerna-badge]: https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg

[spectrum]: https://spectrum.chat/mdx

[spectrum-badge]: https://withspectrum.github.io/badge/badge.svg

[contributing]: https://github.com/mdx-js/mdx/blob/master/contributing.md

[coc]: https://github.com/mdx-js/mdx/blob/master/code-of-conduct.md

[mit]: license

[compositor]: https://compositor.io

[zeit]: https://zeit.co

[mdx]: https://github.com/mdx-js/mdx

[npm]: https://docs.npmjs.com/cli/install

---
_Source: https://npm.io/package/@mdx-js/tag · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
