# @aitodotai/mdx-js-runtime

> Parse and render MDX in a runtime environment

Latest version **0.19.1-alpha.0** (published 2019-02-28) · MIT license · 0 weekly downloads

## Install

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

## 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.19.1-alpha.0 |
| Published | 2019-02-28 |
| First published | 2019-02-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19791 |
| Author | John Otander |
| Maintainers | cventus, kaiinkinen, kimmobrunfeldt, ollkan, phuch, tri.nguyen |
| Keywords | mdx, markdown, react, jsx, remark, mdxast |

## Links

- npm: https://www.npmjs.com/package/@aitodotai/mdx-js-runtime
- 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/@aitodotai/mdx-js-runtime

## Dependencies (3)

- [buble](https://npm.io/package/buble.md) ^0.19.6
- [@mdx-js/tag](https://npm.io/package/@mdx-js/tag.md) ^0.18.0
- [@aitodotai/mdx-js-mdx](https://npm.io/package/@aitodotai/mdx-js-mdx.md) 0.19.0-alpha.0

## 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.19.1-alpha.0 (latest) — 2019-02-28
- 0.19.0-alpha.0 — 2019-02-28

## README

# `@mdx-js/runtime`

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

Parse and render [MDX][] in a runtime environment.

> :warning: **warning**: this is not the preferred way to use MDX since it
> introduces a substantial amount of overhead and dramatically increases
> bundle sizes.
> It should also not be used with user input that isn’t sandboxed.

## Installation

[npm][]:

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

## Usage

```jsx
import React from 'react'
import MDX from '@mdx-js/runtime'

// Provide custom components for markdown elements
const components = {
  h1: props => <h1 style={{ color: 'tomato' }} {...props} />
}

// Provide custom components that will be referenced as JSX
// in the markdown string
const scope = {
  Demo: props => <h1>This is a demo component</h1>
}

const mdx = `
# Hello, world!

<Demo />
`

export default () => (
  <MDX components={components} scope={scope}>{mdx}</MDX>
)
```

## 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/@aitodotai/mdx-js-runtime · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
