MDX Article Example

words
minutes
MDX Article Example

:::tip Firefly supports both Markdown and MDX posts. Use Markdown for normal articles and MDX when you need embedded components or JSX. :::

Markdown vs MDX

| Feature | Markdown | MDX | | :------ | :------- | :-- | | CommonMark syntax | Supported | Supported | | HTML tags | Supported | Supported as JSX | | Component imports | Not available | Supported | | Dynamic expressions | Not available | Supported |

Using a Component

import { Icon } from "astro-icon/components";
<div class="flex items-center gap-2 my-4">
<Icon name="fa7-solid:rocket" class="text-4xl text-red-500" />
<span>Rocket launch</span>
</div>
Rocket launch

JSX Block

This block is written as JSX inside an MDX article.

Current year: 2026

Learn more from the MDX documentation.

Support & Share

If this article helped you, please share or support!

Sponsor
MDX Article Example
https://docs.bingyun.vip/en/posts/markdown/mdx-example/
Author
BingYun
Published at
1970-01-07
License
CC BY-NC-SA 4.0

Comments

Profile image of BingYun
BingYun
Welcome to BingYun Docs!
Categories
Tags
Site Statistics
Posts
12
Categories
2
Tags
5
Total Words
10,808
Running Days
0 days
Last Activity
0 days ago

Table of Contents