Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Archived drop-in MDX component documentation system for Next.js App Router and React Server Components.
Swingset is a drop-in component documentation system for Next.js's App Router and React Server Components that generates documentation routes from MDX files placed next to your components.
Swingset is a tool that adds a documentation route group to a Next.js application, rendering MDX documentation alongside your component code. It takes a Next.js project and a configured componentRoot directory as input and produces an auto-generated documentation site with a route group named (swingset). The project is available on GitHub as the npm package swingset, and the repository is currently archived — the banner states it is deprecated and no longer maintained, with no further updates, bug fixes, or support.
swingset bootstrap generates a (swingset) route group containing layout.tsx, a page.tsx, and a catch-all [...path] page.docs.mdx file next to your component source file, and Swingset renders it as documentation.PropsTable component accepts a component prop and displays prop metadata automatically when the component is imported into MDX..mdx files in /app/(swingset)/swingset/docs/ to render custom documentation pages beyond component docs.theme option in next.config.mjs (e.g. theme: 'swingset-theme-custom') to control rendering; by default Swingset only exposes data, letting you build a custom presentation.remarkPlugins and rehypePlugins in the config; the example shows adding remarkGfm for GitHub Flavored Markdown.@next/mdx — Supports the same mdx-components.ts file at the root of the application, making custom components declared there available in Swingset docs.import * as stories from './Button.stories' and render <stories.Primary />.docs.mdx beside each component and get a browsable docs section with prop tables, without maintaining a separate docs site..mdx pages under the generated docs directory and control them with custom themes.npm install swingset.withSwingset in next.config.mjs and pass options including componentRoot and an optional theme.swingset bootstrap to generate the (swingset) route group inside the app directory.docs.mdx files in the components directory and configure remark/rehype plugins as needed.No. The GitHub repository displays an archive notice stating the project is deprecated, will not receive further updates, bug fixes, or support, and recommends looking for alternative solutions or successor projects.
Install the npm package with npm install swingset, then import withSwingset in next.config.mjs and run swingset bootstrap to generate the documentation route group.
The documentation only describes support for the App Router and React Server Components. No Pages Router integration is mentioned.
Yes. Swingset documentation pages are treated as modules, so you can import Storybook story files into your MDX and render them as live examples.
Set the theme option in the withSwingset config object in next.config.mjs. By default, Swingset exposes data only, so a custom theme is needed to control how documentation renders.
