---
title: MDX Basics
description: Write documentation in Markdown with embedded React components like Card, Tabs, and Accordion -- the syntax behind every Jamdesk page.
---

> **For AI agents:** the complete documentation index is at [llms.txt](/docs/llms.txt). Append `.md` to any page URL for its markdown version.

Every Jamdesk page is an `.mdx` file -- standard Markdown with JSX components like `<Card>`, `<Tabs>`, and `<Accordion>`.

## What is MDX?

MDX combines the simplicity of Markdown with the power of JSX. Write headings, lists, and code blocks in Markdown, then drop in components like `<Card>` or `<Tabs>` wherever you need interactivity.

MDX is also one of the best formats for documentation that needs to be AI-readable. It's plain text (so AI tools can read and write it natively), version-controllable in Git, and structured enough for components without requiring a proprietary format.

```mdx
# Welcome to My Docs

This is regular **Markdown** with a component below:

<Card title="Quickstart" icon="rocket" href="/quickstart">
  Jump right in with our quickstart guide.
</Card>
```

## Page Structure

Every MDX page starts with frontmatter - metadata between triple dashes:

```mdx
---
title: My Page Title
description: A brief description for search and previews
---

Your content starts here...
```

<Note>
The `title` and `description` appear in search results, browser tabs, and social media previews. Write them thoughtfully.
</Note>

## Markdown Essentials

### Headings

Use `##` for main sections and `###` for subsections. Jamdesk automatically generates a table of contents from your headings.

```markdown
## Main Section
Content under the main section.

### Subsection
More detailed content here.
```

<Tip>
Start with `##` (h2) for your first heading. The page title from frontmatter serves as the h1.
</Tip>

### Text Formatting

| Syntax | Result |
|--------|--------|
| `**bold**` | **bold** |
| `*italic*` | *italic* |
| `~~strikethrough~~` | ~~strikethrough~~ |
| `` `inline code` `` | `inline code` |

### Lists

```markdown
Unordered list:
- First item
- Second item
  - Nested item

Ordered list:
1. First step
2. Second step
3. Third step
```

### Blockquotes

```markdown
> This is a blockquote. Use it for callouts or
> highlighting important information.
```

> This is a blockquote. Use it for callouts or highlighting important information.

## Adding Components

Components are JSX elements you can use anywhere in your MDX. They're self-closing or wrap content:

```mdx
{/* Self-closing component */}
<Card title="Example" icon="star" href="/introduction" />

{/* Component wrapping content */}
<Accordion title="Click to expand">
  This content is inside the accordion.
</Accordion>
```

### Available Components

Jamdesk provides a rich set of built-in components:

<Columns cols={2}>
  <Card title="Cards" icon="square" href="/components/card">
    Highlight features and create navigation
  </Card>
  <Card title="Tabs" icon="table-columns" href="/components/tabs">
    Organize content into switchable panels
  </Card>
  <Card title="Accordion" icon="chevron-down" href="/components/accordion">
    Collapsible sections for optional content
  </Card>
  <Card title="Steps" icon="list-ol" href="/components/steps">
    Numbered procedures and tutorials
  </Card>
</Columns>

## Tables

Standard Markdown tables work out of the box:

```markdown
| Feature | Free | Pro |
|---------|------|-----|
| Pages | 10 | Unlimited |
| Custom domain | No | Yes |
```

| Feature | Free | Pro |
|---------|------|-----|
| Pages | 10 | Unlimited |
| Custom domain | No | Yes |

For advanced features like row highlighting, cell alignment, and spanning, use the Table component:

<Table striped>
  <Row header>
    <Cell>Feature</Cell>
    <Cell align="center">Free</Cell>
    <Cell align="center">Pro</Cell>
  </Row>
  <Row>
    <Cell>Pages</Cell>
    <Cell align="center">10</Cell>
    <Cell align="center" highlight highlightColor="success">Unlimited</Cell>
  </Row>
  <Row>
    <Cell>Custom domain</Cell>
    <Cell align="center">No</Cell>
    <Cell align="center" highlight highlightColor="success">Yes</Cell>
  </Row>
</Table>

<Note>
See [Tables](/components/tables) for full component documentation including row/cell highlighting, column spanning, and styling options.
</Note>

## Comments

Add comments that won't appear in the rendered output:

```mdx
{/* This is a comment - it won't be visible to readers */}
```

## What's Next?

<Columns cols={2}>
  <Card title="SEO Optimization" icon="magnifying-glass-chart" href="/content/seo">
    Improve discovery and metadata
  </Card>
  <Card title="Frontmatter" icon="file-lines" href="/content/frontmatter">
    Define titles, descriptions, and SEO fields
  </Card>
</Columns>
