
Using MDX with OneXscale
Table of Contents
Loading table of contents...
This theme comes with the @astrojs/mdx integration installed and configured in your astro.config.mjs
config file. If you prefer not to use MDX, you can disable support by removing the integration from your config file.
Why MDX?
MDX is a special flavor of Markdown that supports embedded JavaScript & JSX syntax. This unlocks the ability to mix JavaScript and UI Components into your Markdown content for things like interactive charts or alerts.
If you have existing content authored in MDX, this integration will hopefully make migrating to Astro a breeze.
Example
Here is how you import and use a UI component inside of MDX.
When you open this page in the browser, you should see the clickable button below.
Embedded component in MDX
More Links
- MDX Syntax Documentation
- Astro Usage Documentation
- Note: Client Directives are still required to create interactive components. Otherwise, all components in your MDX will render as static HTML (no JavaScript) by default.
Subscribe to Our Newsletter
Get the latest articles, resources and exclusive content straight to your inbox.
You Might Also Like

10 Content Marketing Strategies That Transform Consulting Businesses in 2025
Discover how high-performing consultants are using strategic content marketing to attract premium clients, establish thought leadership, and scale their practices without sacrificing quality.

7 Essential AI Tools Every Consultant Should Use in 2025
Transform your consulting practice with these powerful AI tools that streamline workflows, enhance client deliverables, and give you a competitive edge.

Third post
Discover proven growth strategies for scaling your consulting business and increasing your client base exponentially.
Comments (0)
No comments yet. Be the first to share your thoughts!