Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mdx-js/tag

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mdx-js/tag

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

  • 0.17.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.6K
decreased by-11.7%
Maintainers
4
Weekly downloads
 
Created
Source

@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

Keywords

FAQs

Package last updated on 15 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc