export const info = { author: [ {github: 'johno', name: 'John Otander', twitter: '4lpine'}, {github: 'wooorm', name: 'Titus Wormer', twitter: 'wooorm'} ], modified: new Date('2024-10-18'), published: new Date('2020-03-11') } export const navSortSelf = 4 # Components A great thing about MDX is that you can write markdown and specify a component to be used instead of an HTML element. {/* more */} The following table lists those HTML elements that can be overwritten, the needed markdown, and what the normal JSX equivalent would be. But, taking the first row for `a` as an example, you can replace that hyperlink with `` by doing: ```tsx import Readme from './readme.md' // Assumes an integration is used to compile MDX -> JS. import {FancyLink} from './components/fancy-link.js' ``` More information on how to use markdown can be found in [CommonMark][].
Name Markdown syntax Equivalent JSX
`a` ```mdx chrome=no [MDX](https://mdxjs.com "title") ``` ```tsx chrome=no <>

MDX

```
`blockquote` ```mdx chrome=no > A greater than… ``` ```tsx chrome=no <>

A greater than…

```
`br` ```mdx chrome=no A backslash\ before a line break… ``` ```tsx chrome=no <>

A backslash
before a line break…

```
`code` ````mdx chrome=no Some `backticks` for inline. ```javascript backtick.fences('for blocks') ``` ```` ```tsx chrome=no <>

Some backticks for inline.

backtick.fences('for blocks')
            
```
`em` ```mdx chrome=no Some *asterisks* for emphasis. ``` ```tsx chrome=no <>

Some asterisks for emphasis.

```
`h1` ```mdx chrome=no # One number sign… ``` ```tsx chrome=no <>

One number sign…

```
`h2` ```mdx chrome=no ## Two number signs… ``` ```tsx chrome=no <>

Two number signs…

```
`h3` ```mdx chrome=no ### Three number signs… ``` ```tsx chrome=no <>

Three number signs…

```
`h4` ```mdx chrome=no #### Four number signs… ``` ```tsx chrome=no <>

Four number signs…

```
`h5` ```mdx chrome=no ##### Five number signs… ``` ```tsx chrome=no <>
Five number signs…
```
`h6` ```mdx chrome=no ###### Six number signs… ``` ```tsx chrome=no <>
Six number signs…
```
`hr` ```mdx chrome=no Three asterisks for a thematic break: *** ``` ```tsx chrome=no <>

Three asterisks for a thematic break:


```
`img` ```mdx chrome=no ![Alt text](/logo.png "title") ``` ```tsx chrome=no <>

Alt text

```
`li` ```mdx chrome=no * asterisks for unordered items 1. decimals and a dot for ordered items ``` ```tsx chrome=no <>
  • asterisks for unordered items
  1. decimals and a dot for ordered items
```
`ol` ```mdx chrome=no 1. decimals and a dot for ordered ``` ```tsx chrome=no <>
  1. decimals and a dot for ordered
```
`p` ```mdx chrome=no Just some text… ``` ```tsx chrome=no <>

Just some text…

```
`pre` ````mdx chrome=no ```javascript backtick.fences('for blocks') ``` ```` ```tsx chrome=no <>
backtick.fences('for blocks')
            
```
`strong` ```mdx chrome=no Two **asterisks** for strong. ``` ```tsx chrome=no <>

Two asterisks for strong.

```
`ul` ```mdx chrome=no * asterisks for unordered ``` ```tsx chrome=no <>
  • asterisks for unordered
```
The components you can overwrite use their standard HTML names. Normally, in markdown, those names are: `a`, `blockquote`, `br`, `code`, `em`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `hr`, `img`, `li`, `ol`, `p`, `pre`, `strong`, and `ul`. With [`remark-gfm`][gfm] ([see guide][guide-gfm]), you can also use: `del`, `input`, `section`, `sup`, `table`, `tbody`, `td`, `th`, `thead`, and `tr`. Other remark plugins that add support for new constructs and advertise that they work with rehype, will also work with MDX. More information on components is available in [¶ Components in § Using MDX][components]. [gfm]: https://github.com/remarkjs/remark-gfm [components]: /docs/using-mdx/#components [commonmark]: https://spec.commonmark.org/current/ [guide-gfm]: /guides/gfm/