Postkit is a portable publishing toolkit for rendering structured articles across React, email, Next.js, React Router, TanStack Router, and Astro. It combines an article component system, Markdown and MDX tooling, framework-aware links, and provider-neutral URL metadata resolution.
Use Postkit when content should keep its meaning while the application, router, or rendering environment changes.
| Package | Use it when |
|---|---|
@postkit/core |
An API, feed reader, or renderer needs versioned HTML, Markdown, MDX, and JSON interchange without React. |
@postkit/react |
A React application needs article components, Markdown/MDX mappings, directives, or Chakra-based theming. |
@postkit/email |
An email build needs Postkit content rendered with Chakra Email primitives and email-safe fallbacks. |
@postkit/shiki |
A Postkit application needs lazy Shiki syntax highlighting for Chakra code blocks. |
@postkit/next |
A Next.js application needs the React component map with next/link routing. |
@postkit/react-router |
A React Router application needs Postkit components and router-native internal links. |
@postkit/tanstack-router |
A TanStack Router application needs Postkit components and typed route resolution. |
@postkit/astro |
An Astro site needs Markdown/MDX integration with selective React hydration. |
@postkit/unfurl |
A server or build process needs normalized Open Graph, oEmbed, link-preview, or social-post metadata. |
Framework adapters depend on @postkit/react; install the adapter that matches
the application rather than assembling its routing integration by hand.
Install Postkit and its peer dependencies:
npm install @postkit/react @chakra-ui/react @emotion/react react react-domMount PostkitProvider, then use individual components or the supplied MDX
component map:
import {
createPostkitMdxComponents,
Callout,
PostkitProvider,
} from '@postkit/react';
export const mdxComponents = createPostkitMdxComponents();
export function Article() {
return (
<PostkitProvider>
<main>
<h1>Portable publishing</h1>
<Callout title="Keep the content" tone="tip">
Change the renderer without changing the article.
</Callout>
</main>
</PostkitProvider>
);
}For a framework application, continue with its package guide:
HTML, Markdown, MDX, JSON, or structured declarations
|
@postkit/core document contract
|
Component or framework renderer
|
Site theme, router, and resolvers
|
Rendered article output
Postkit owns the portable content contract and structural presentation. Its
React renderer inherits the host Chakra system by default; applications can opt
into postkitDefaultTheme for Postkit's standalone visual preset. The
application still owns its outer layout, routing policy, asset pipeline,
secrets, and server-side unfurling service.
@postkit/unfurl is deliberately separate from rendering. It normalizes remote
metadata behind a server or build-time boundary; components consume the
normalized result without receiving provider credentials.
- Component and theming guide
- Email rendering guide
- Shiki code-block adapter
- Unfurling and oEmbed guide
- Astro integration and hydration policy
- Executable framework and service examples
- Generated TypeScript API reference
- Agent documentation index
- Contributing
- Release process
- Changelog
The documentation site and generated component catalog live in apps/site.
Package READMEs remain self-contained because npm renders the README from each
published package.
Postkit is in its initial public release series. Public APIs are typed and
release artifacts are tested in a clean consumer, but additions and refinements
should be expected before 1.0.
@postkit/prismark remains in the Prismark workspace until
@prismark/component-protocol is published independently.
Postkit is available under the MIT License.
| Integration | Supported range |
|---|---|
| React | 19 |
| Chakra UI | >=3.29.0 <4 |
| Shiki | ^4.3.1 |
| Next.js | >=15 <17 |
| React Router | >=7 <8 |
| TanStack Router | >=1.120 <2 |
| Astro | >=6.4 <8 |
See compatibility and environments for rendering details, support for issue guidance, and the security policy for private vulnerability reporting and trust boundaries.