Substack React Registry, by Nathan Colosimo

Minimal primitives for Substack content in React.

Built with the Shadcn component model and Zod validation so you can wire up Substack posts, publications, and profiles without bespoke SDKs. Install only what you need using the snippets below, or explore the full registry onGitHub.

Registry Overview

Post List
Fetches the latest posts for a Substack profile and renders them with Shadcn Item primitives.
Post Card
Server component for showcasing a single post — delegates UI to PostCardDisplay.
Post Card Display
Presentational card that accepts a parsed post object. Bring your own data source.
Profile
Server component that looks up a public Substack profile and passes it to ProfileDisplay.
Profile Display
Display-only profile layout with avatar, cover, and subscribe call-to-action.
Post & Profile Utils
Fetch() and Zod based helpers for posts, publications, and profile metadata. Able to be used either server OR client side.

<PostList profileHandle='nathancolosimo' />

Server (or client!) component that pulls the latest Substack posts for a handle and renders them with ShadcnItem primitives.

profileHandle needs to bea public Substack handle for a profile, NOT a publication.

Loading...
pnpm dlx shadcn@latest add https://substack-react.nathancolosimo.com/r/post-list.json

<PostCard postId={150198789} />

Look up a single post by id and display it using the shared PostCardDisplay layout.

Pass any integer Substack post id, or fetch the post in a different way and use PostCardDisplay directly.

Loading...
pnpm dlx shadcn@latest add https://substack-react.nathancolosimo.com/r/post-card.json

<Profile handle='nathancolosimo' />

Resolve a public Substack handle and present a card layout with cover, avatar, and link actions.

Need finer control? Install ProfileDisplay for a presentation-only version.

Loading...
pnpm dlx shadcn@latest add https://substack-react.nathancolosimo.com/r/profile.json

Backend utilities

These helpers perform a fetch to Substack and validates the payload with Zod so downstream components receive typed data.

Profile Utils Usage
import { profileForHandle } from "@/lib/profile";async function loadProfile() {  // Fetch the author profile once so you can share the id across other helpers.  const profile = await profileForHandle("nathancolosimo");  return { profile };}
pnpm dlx shadcn@latest add https://substack-react.nathancolosimo.com/r/profile-utils.json
Post Utils Usage
import {    postForId,    publicationPostsForURL,    userPostsForId,  } from "@/lib/posts";import { profileForHandle } from "@/lib/profile";async function loadPosts() {  // Fetch the author profile once so you can share the id across other helpers.  const profile = await profileForHandle("nathancolosimo");  // Pull the ten latest posts for dashboards or newsletters.  const latestPosts = await userPostsForId(profile.id, { limit: 10 });  // Hydrate a hero card with a specific post id.  const featurePost = await postForId(latestPosts[0]?.id ?? 0);  // Reuse publication data for landing pages, sorted newest-first by default.  const publicationPosts = await publicationPostsForURL(    "https://nathancolosimo.substack.com",    { limit: 5 }  );  return { profile, latestPosts, featurePost, publicationPosts };}
pnpm dlx shadcn@latest add https://substack-react.nathancolosimo.com/r/post-utils.json