MDX document
How to create a MDX document with markdown syntax
Heading
It's a mandatory part for creating markdown document. You document should contain at least title
and description
.
MDX syntax
If you're not familiar with markdown syntax, you can check the HTML equivalent
here
Example of markdown .mdx
file
Modify markdown
The main markdown components are styled in src/components/Mdx/mdx-components.tsx
file.
For example, if you want to change style for h3
component, change it for appropriate key in mdxComponents
object.
Additional markdown component
Markdown components are limited. And sometimes we need to add custom components.
To do it, in mdx-components.tsx
file, you can add new component to mdxComponents
object.
For example, Tabs component.
Now you could use this component in your .mdx
file. No need to import component! The component will be recognized automatically after adding it to mdx-components.tsx
file.
Use shadcn components
No need to create components from scratch. You can use ready , that we use in our boilerplate. It's free and with MIT license.
ui.shadcn.com components