MDX component showcase
This page demonstrates all 41 content components. Use Markdown for regular posts and .mdx when you need components.
Audio
<Audio src="/media/shortcodes/t-rex-roar.mp3" name="Sample audio" />
Bubble
<Bubble notation="A little more context">Hover for a note</Bubble>
Hover for a noteA little more context
Button
<Button url="/archives/" text="Read the posts" icon="fas fa-book" />
Read the posts
BVideo
<BVideo bvid="BV1GJ411x7h7" />
Card
<Card title="Project card" desc="A space to introduce your project." cover="/img/demo/cover-getting-started-v2.webp" url="/about/" tag="Theme" star={5} />
Theme
Project cardA space to introduce your project.
ChartJS
<ChartJS config={{type:"bar",data:{labels:["Posts","Notes","Projects"],datasets:[{label:"Content",data:[12,8,4]}]}}} description="Local sample data" />
{"type":"bar","data":{"labels":["Posts","Notes","Projects"],"datasets":[{"label":"Content","data":[12,8,4]}]}}Local sample data
Checkbox
<Checkbox checked={true}>Completed task</Checkbox>
Completed task
Flink
<Flink groups={[{class_name:"Official resources",link_list:[{name:"Astro",link:"https://astro.build/",avatar:"/img/logo.png",descr:"Static site framework"}]}]} />
Official resources
Fold
<Fold title="Expand this section">A note inside the fold.</Fold>
Expand this section
A note inside the fold.
Gallery
<Gallery columns={2}>
<GalleryItem src="/img/demo/cover-getting-started-v2.webp" alt="Create" />
<GalleryItem src="/img/demo/cover-pagination-v2.webp" alt="Collect" />
</Gallery>


GalleryGroup
<GalleryGroup title="Explore the gallery" img="/img/demo/cover-shortcodes-v2.webp" url="/about/">A collection of moments.</GalleryGroup>

Explore the gallery
A collection of moments.
GalleryItem
<GalleryItem src="/img/demo/cover-getting-started-v2.webp" alt="Gallery image" />

Gitea
<Gitea host="https://codeberg.org" repo="forgejo/forgejo" />
gitea![]()
forgejoLoading repository information…
Gitee
<Gitee repo="mirrors/vue" />
gitee![]()
vueLoading repository information…
GitHub
<GitHub repo="withastro/astro" />
github![]()
astroLoading repository information…
GitLab
<GitLab repo="gitlab-org/gitlab" />
gitlab![]()
gitlabLoading repository information…
HideBlock
<HideBlock text="Reveal content">Hidden block content.</HideBlock>
HideInline
<HideInline text="Reveal">Hidden inline content</HideInline>
HideToggle
<HideToggle title="Toggle content">Open and close this content.</HideToggle>
Image
<Image src="/img/demo/cover-shortcodes-v2.webp" alt="Solitude component example" caption="Bundled sample image" />

InlineImage
<InlineImage src="/img/logo.png" alt="Solitude" height="32px" />
Keyboard
<Keyboard>⌘ K</Keyboard>
⌘ K
Label
<Label color="green">Complete</Label>
Complete
Link
<Link title="Astro" desc="Astro website" url="https://astro.build/" />
Mermaid
<Mermaid code={"graph LR\nA[Content] --> B[Astro] --> C[HTML]"} />
graph LR
A[Content] --> B[Astro] --> C[HTML]
Note
<Note type="info">A callout with **Markdown** support.</Note>
Paragraph
<Paragraph color="blue">A paragraph with a splash of color.</Paragraph>
A paragraph with a splash of color.
Radio
<Radio checked={false}>An option</Radio>
An option
Score
<Score score={"X:1\nT:Simple tune\nM:4/4\nL:1/4\nK:C\nC D E F | G A B c |"} />
X:1
T:Simple tune
M:4/4
L:1/4
K:C
C D E F | G A B c |
Series
<Series name="Theme essentials" />
- Light, dark, and custom styles
- Make reading more accessible
- Import content from Hugo
- Deploy your static blog
- Build your About page
- Music and page navigation
- Connect a comment service
- Search and feeds
- Homepage recommendations and sidebar
- Write with Markdown and MDX
- Configure your theme
- Getting started with Astro Solitude
Text
<Text color="red">Something worth highlighting.</Text>
Something worth highlighting.
Spoiler
<Spoiler>A little spoiler</Spoiler>
A little spoiler
Subnote
<Subnote type="success">An additional note.</Subnote>
Tab
<Tabs><Tab title="A single panel">Place Tab inside Tabs.</Tab></Tabs>
Tabs
<Tabs id="demo-tabs">
<Tab title="Markdown">Text and lists.</Tab>
<Tab title="MDX">Components and interactions.</Tab>
</Tabs>
Timeline
<Timeline title="A theme journey" color="blue">
<Timenode time="Step one" title="Create a site">Start from the template.</Timenode>
<Timenode time="Step two" title="Start writing">Publish your first post.</Timenode>
</Timeline>
Create a siteStart from the template.
Start writingPublish your first post.
Timenode
<Timeline><Timenode time="Now" title="Keep creating">Keep the moments worth sharing.</Timenode></Timeline>
Keep creatingKeep the moments worth sharing.
Typeit
<Typeit speed={80}>Capture everyday life in words.</Typeit>
Capture everyday life in words.
Video
<Video src="/media/shortcodes/flower.mp4" poster="/img/demo/cover-shortcodes-v2.webp" />
Videos
<Videos col={2} sources={["/media/shortcodes/flower.mp4"]} />
YouTube
<YouTube id="aqz-KE-bpKQ" />
Math formulas
MDX also supports inline formulas and display formulas:
This article is licensed underCC BY-NC-SA 4.0and published bySolitude.