Git Product home page Git Product logo

mdx's Introduction

Logo

Build Status Join the community on Spectrum

Markdown for the component era.

MDX is a format that lets you seamlessly use JSX in your Markdown documents. You can import components, like interactive charts or notifs, and export metadata. This makes writing long-form content with components a blast πŸš€.

See it in action

import { Chart } from '../components/chart'

# Here's a chart

The chart is rendered inside our MDX document.

<Chart />

❀️ Powerful: MDX blends Markdown and JSX syntax to fit perfectly in React/JSX-based projects.

πŸ’» Everything is a component: Use existing components inside your MDX and import other MDX files as plain components.

πŸ”§ Customizable: Decide which component is rendered for each Markdown element ({ h1: MyHeading }).

πŸ“š Markdown-based: The simplicity and elegance of Markdown remains, you interleave JSX only when you want to.

πŸ”₯ Blazingly blazing fast: MDX has no runtime, all compilation occurs during the build stage.

Watch some of these features in action

β€œIt's extremely useful for using design system components to render markdown and weaving interactive components in with existing markdown.”

β€” @chrisbiscardi

Why?

Before MDX, some of the benefits of writing Markdown were lost when integrating with JSX. Implementations were often template string-based which required lots of escaping and cumbersome syntax.

MDX seeks to make writing with Markdown and JSX simpler while being more expressive. The possibilities are endless when you combine components (that can even be dynamic or load data) with the simplicity of Markdown for long-form content.

  • Fast
  • No runtime compilation
  • Pluggable
  • Element to React component mapping
  • React component import/export
  • Customizable layouts
  • Webpack loader
  • Parcel plugin
  • Next.js plugin
  • Gatsby plugin

Getting started

npm init mdx

Related

See related projects in the MDX specification.

Authors


MIT license

mdx's People

Contributors

johno avatar timneutkens avatar silvenon avatar manovotny avatar jeetiss avatar danielruf avatar devongovett avatar pshrmn avatar macklinu avatar charliewilco avatar christiannwamba avatar christopherbiscardi avatar danmarshall avatar ifyoumakeit avatar demiand avatar compuives avatar maadhattah avatar johncmunson avatar l3wi avatar lorensr avatar azz avatar isthisnagee avatar saratonite avatar sebastiandedeyne avatar trevordmiller avatar treshugart avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.