Ariadocs
Get Started

Docs and API references for React

Write your guides in MDX and bring your OpenAPI spec. Ariadocs turns both into pages, with one set of React components.

Get StartedBrowse Components
pnpm add @ariadocs/mdx @ariadocs/openapi @ariadocs/components

@ariadocs/mdx

Write docs in MDX

Put .mdx files in a folder. Each one becomes a page with its frontmatter, its table of contents and your own components.

Read the docs →
content/docs/first-email.mdx
---
title: Sending your first email
---

Install the SDK, then call `emails.send` with
a sender, a recipient and some HTML.

<Callout type="tip">
  Use `onboarding@resend.dev` as the sender
  while you test.
</Callout>

## Install

```bash
npm install resend
```
lib/docs.ts
import { createDocs } from "@ariadocs/mdx";

const docs = createDocs({ contentDir: "content/docs" });

const { MDX, frontmatter, toc } = await docs.parse({
  slug: "first-email",
});

Result

Sending your first email

Install the SDK, then call emails.send with a sender, a recipient and some HTML.

Use onboarding@resend.dev as the sender while you test.

Install

npm install resend

@ariadocs/openapi

Render your API from OpenAPI

Point it at a JSON or YAML spec. Every endpoint becomes typed data, and the components turn it into a page. This is Resend's real spec.

Read the docs →
openapi.yaml
paths:
  /emails/{email_id}:
    get:
      operationId: emails/get
      tags:
        - Emails
      summary: Retrieve a single email
      parameters:
        - name: email_id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the email.
app/reference/page.tsx
<OpenAPI.Root api={await openapi.parse()}>
  <OpenAPI.Operation id="emails-get">
    <OpenAPI.Operation.Title />
    <OpenAPI.Operation.Header />
    <OpenAPI.Operation.Parameters />
  </OpenAPI.Operation>
</OpenAPI.Root>

Result

Retrieve a single email

GEThttps://api.resend.com/emails/{email_id}
email_idstringrequired

The ID of the email.

@ariadocs/components

One sidebar for both

Both packages return navigation in the same format. Merge them and one component renders your guides and your endpoints.

Read the docs →
app/layout.tsx
const sidebar = [
  ...(await docs.getNavigation()),
  ...(await openapi.getNavigation()),
];

<Docs.Nav items={sidebar} />

Works with your framework