Developer Changelog with Code
A developer-facing changelog where each release's prose notes and change list sit alongside a short, hardcoded code snippet, such as a migration example or an API diff. Aimed at API/SDK changelogs where a couple of lines of code communicate a breaking change faster than prose alone.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/developer-changelog-with-code.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/changelog/changelog19.tsx instead.
Usage
The file also exports changelog19Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Changelog19, changelog19Demo } from "@/components/blocks/changelog/changelog19"; export default function Page() { return <Changelog19 {...changelog19Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Developer changelog" | Section heading. |
| description | string | "API changes, migration notes, and under-the-hood improvements." | Section intro text. |
| releases | Changelog19Release[] | none | Releases, each with optional code sample and a change list. |
| className | string | none | Extra classes for the outer section element. |
Types
type Changelog19ChangeType = "added" | "changed" | "fixed" | "removed"; type Changelog19Change = { type: Changelog19ChangeType; text: string; }; type Changelog19Release = { id: string; version: string; date: string; heading?: string; description: string; codeLabel?: string; code?: string; changes: Changelog19Change[]; };
Behavior notes
- Purely presentational: no interactive state or backend calls. The code sample is a static hardcoded string per release, not fetched or executed.
- Code is rendered as plain monospace text in a <pre><code> block, not syntax-highlighted; no highlighting library is used or needed.
- The code block's container scrolls horizontally on its own (overflow-x-auto) rather than letting a long line widen or break the page layout, matching the repo's table/code horizontal-scroll convention.
- code and codeLabel are both optional per release; a release with neither renders as a plain prose-and-change-list entry with no code block at all.
- Change type uses the shared badge mapping: added is default, changed is secondary, fixed is outline, removed is destructive.
More Changelog Blocks
View all →Split Milestone Changelog
Two-column release entries pairing milestone context with highlights and metrics.
Changelog Release Feed
Release feed cards with aligned change-type labels and an optional CTA per card.
Grouped Changelog Board
Releases grouped under bold month headings with aligned version and description columns.
Milestone Changelog Timeline
Vertical timeline of releases with a connecting line, version badges, and tone-coded change types.
Minimal Text Changelog
Ultra-plain, text-only changelog with no badges, cards, or borders.
Categorized Release Notes
Per-release changes grouped into Added, Changed, and Fixed sub-sections.