Components
Edit on GitHubComponents for docs pages and API references.
pnpm add @ariadocs/componentsThere are two groups. Docs.* lays out MDX pages: the sidebar, the table of contents and the page itself. OpenAPI.* renders endpoints from a parsed spec.
Each component works on its own. You can also pass children to choose which parts it shows. Here's Resend's "List emails" endpoint with only its header and parameters:
Preview
GET
https://api.resend.com/emails<OpenAPI.Root api={api}>
<OpenAPI.Operation id="emails-list">
<OpenAPI.Operation.Header />
<OpenAPI.Operation.Parameters />
</OpenAPI.Operation>
</OpenAPI.Root>
Leave out the children and you get the full endpoint page.
Setup
The components use Tailwind CSS v4. Let Tailwind scan the package, then import the styles once:
app/globals.css
@import "tailwindcss";
@plugin "@tailwindcss/typography";
@source "../node_modules/@ariadocs/components/dist";
app/layout.tsx
import "@ariadocs/components/styles.css";
If you use shadcn/ui, the components use your colors. You can render them from Server or Client Components.