Components
Use React components in Markdown using MDX.
The following components are available out of the box for use in Markdown.
If you'd like to build and add your own custom components, see the Custom Components section below.
Built-in Components
1. Callout
This is a default callout. You can embed Markdown inside a callout
.
This is a warning callout. It uses the props type="warning"
.
This is a danger callout. It uses the props type="danger"
.
This is a warning callout. It uses the props type="note"
.
This is a danger callout. It uses the props type="info"
.
This is a warning callout. It uses the props type="success"
.
2. Card
You can also use HTML to embed cards in a grid.
Custom Components
You can add your own custom components using the components
props from useMDXComponent
.
Once you've added your custom component, you can use it in MDX as follows:
HTML Elements
You can overwrite HTML elements using the same technique above.
This will overwrite the <hr />
tag or ---
in Mardown with the HTML output above.
Styling
Tailwind CSS classes can be used inside MDX for styling.
Make sure you have configured the path to your content in your tailwind.config.js
file: