React components for rendering Markdown and MDX content with Prose UI, optimized for Next.js. Uses `next/link` and `next/image` for better performance.
React components for rendering Markdown and MDX content with Prose UI, optimized for Next.js. Uses next/link and next/image for better performance.
For non-Next.js React projects, use @prose-ui/react instead.
``bash`
npm install @prose-ui/next @prose-ui/style
Pass the MDX components to your renderer and wrap content with the prose-ui class:
`tsx
import { mdxComponents } from '@prose-ui/next'
import '@prose-ui/style/prose-ui.css'
// Pass components to your MDX renderer
// Wrap content with the prose-ui class
For math formulas, also import the KaTeX styles:
`css
@import '@prose-ui/style/katex.min.css';
`$3
Import individual components as needed:
`typescript
import {
Callout,
CodeBlock,
Frame,
Heading,
Image,
Link,
InlineMath,
BlockMath,
// ...
} from '@prose-ui/next'
``Prose UI is an open-source library of React components and customizable CSS styles for rendering Markdown and MDX content. It provides polished typography and components for documentation sites, blogs, and content-focused applications.
Looking for a visual editing experience? Dhub is a git-based CMS for technical documentation with Notion-like Markdown editing. It commits directly to GitHub—no lock-in.
MIT