Interactive components for content
MDX files (.mdx) support interactive components. Use these in your content.
Notice
Highlight important information with colored callouts:
Info
Tip
Warning
Danger
Usage:
<Notice type="info">Your message here.</Notice>
<Notice type="tip">Your message here.</Notice>
<Notice type="warning">Your message here.</Notice>
<Notice type="danger">Your message here.</Notice>
Available types: info, tip, warning, danger
Accordion
Expandable content sections for hiding details:
This content is hidden until clicked. Useful for FAQs, technical details, or optional information.
Usage:
<Accordion client:load title="Click to expand">
Hidden content goes here.
</Accordion>
Info
The client:load directive enables interactivity. Required for Accordion to
work.
Tabs
Tabbed content for organizing related information:
- Option A
- Option B
- Option C
Usage:
<Tabs client:load>
<Tab name="First Tab">Content for first tab.</Tab>
<Tab name="Second Tab">Content for second tab.</Tab>
</Tabs>
Info
Add client:load to the Tabs component. Each Tab needs a name attribute.
Button
Call-to-action buttons for important links:
User Guide Reference DocsUsage:
<Button href="/path/" label="Button Text" />
<Button href="/path/" label="Outline Style" style="outline" />
Styles: solid (default), outline
Youtube
Embed YouTube videos with a lightweight player:
<Youtube id="dQw4w9WgXcQ" title="Video Title" />
The id is the video ID from the YouTube URL (e.g., youtube.com/watch?v=dQw4w9WgXcQ).
Tip
YouTube embeds use a lightweight player that only loads when clicked, improving page performance.
Usage Tips
- Use
.mdxextension for files with components - Add
client:loadto interactive components (Accordion, Tabs) - Components are case-sensitive (
Noticenotnotice) - Standard Markdown works alongside components
- Components can contain Markdown content
Next Steps
- Learn about Text Collections for blog content
- See Video Collections for embedding videos
- Explore Collection Configuration for site settings