Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Changelogs

2 examples. Resize any preview to see it at phone and tablet widths.

Changelog

Free

A dated timeline of releases with a sliding type filter, tagged entries that expand into itemized notes, and an RSS link.

Hide code
components/blocks/changelog.tsx
"use client";

import { useMemo, useState } from "react";
import { AnimatePresence, LayoutGroup, motion, useReducedMotion } from "motion/react";
import { ChevronDown, Rss } from "lucide-react";
import { cn } from "@/lib/utils";

type Kind = "New" | "Improved" | "Fixed";
type Entry = { version: string; date: string; title: string; kind: Kind[]; summary: string; details: { kind: Kind; text: string }[] };

const entries: Entry[] = [
  {
    version: "2.8.0",
    date: "Nov 18, 2026",
    title: "Saved views and shared filters",
    kind: ["New", "Improved"],
    summary: "Save any combination of filters as a view and share it with your workspace.",
    details: [
      { kind: "New", text: "Saved views appear in the sidebar and sync across devices." },
      { kind: "New", text: "Share a view by link; recipients see it with their own permissions." },
      { kind: "Improved", text: "Filter chips are now keyboard reorderable." },
    ],
  },
  {
    version: "2.7.2",
    date: "Nov 6, 2026",
    title: "Faster exports",
    kind: ["Improved", "Fixed"],
    summary: "CSV exports over 100k rows now stream instead of timing out.",
    details: [
      { kind: "Improved", text: "Exports stream in chunks and show progress." },
      { kind: "Fixed", text: "Timezone offsets in exported dates matched UTC instead of the workspace zone." },
    ],
  },
  {
    version: "2.7.0",
    date: "Oct 22, 2026",
    title: "Webhooks with retries",
    kind: ["New"],
    summary: "Subscribe to events and get signed payloads with automatic exponential retries.",
    details: [
      { kind: "New", text: "Event catalog with 14 event types." },
      { kind: "New", text: "HMAC signatures and a replay button for failed deliveries." },
    ],
  },
  {
    version: "2.6.4",
    date: "Oct 9, 2026",
    title: "Billing fixes",
    kind: ["Fixed"],
    summary: "Prorated seat changes now show on the next invoice preview.",
    details: [
      { kind: "Fixed", text: "Removing a seat mid-cycle didn't credit the remaining days." },
      { kind: "Fixed", text: "Invoice PDFs cut off long company names." },
    ],
  },
];

const tone: Record<Kind, string> = {
  New: "bg-emerald-500/12 text-emerald-700 dark:text-emerald-400",
  Improved: "bg-sky-500/12 text-sky-700 dark:text-sky-400",
  Fixed: "bg-amber-500/12 text-amber-700 dark:text-amber-400",
};
const filters = ["All", "New", "Improved", "Fixed"] as const;
const ring = "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background";

export default function ChangelogBlock() {
  const reduce = useReducedMotion();
  const [filter, setFilter] = useState<(typeof filters)[number]>("All");
  const [open, setOpen] = useState<string | null>(entries[0].version);
  const shown = useMemo(() => (filter === "All" ? entries : entries.filter((e) => e.kind.includes(filter))), [filter]);

  return (
    <section className="max-w-[100vw] min-h-full w-full bg-background px-4 py-14 sm:px-6">
      <div className="mx-auto max-w-3xl">
        <div className="flex flex-wrap items-end justify-between gap-4">
          <div>
            <h2 className="text-2xl font-semibold tracking-tight">Changelog</h2>
            <p className="mt-1 text-sm text-muted-foreground">Everything we shipped, newest first.</p>
          </div>
          <a href="#rss" onClick={(e) => e.preventDefault()} className={cn("inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-xs font-medium shadow-[inset_0_1px_0_rgb(255_255_255/0.05),0_1px_1px_rgb(0_0_0/0.05)]", ring)}>
            <Rss className="size-3.5 text-orange-500" aria-hidden />
            RSS
          </a>
        </div>

        <LayoutGroup id="changelog-filter">
          <div role="radiogroup" aria-label="Filter by type" className="mt-6 inline-flex rounded-md border border-border bg-muted/50 p-0.5">
            {filters.map((f) => (
              <button
                key={f}
                type="button"
                role="radio"
                aria-checked={filter === f}
                onClick={() => setFilter(f)}
                className={cn("relative h-7 rounded px-3 text-xs font-medium transition-colors", filter === f ? "text-foreground" : "text-muted-foreground hover:text-foreground", ring)}
              >
                {filter === f ? (
                  <motion.span layoutId="cl-pill" transition={{ type: "spring", stiffness: 500, damping: 36 }} className="absolute inset-0 rounded bg-background shadow-[0_0_0_1px_var(--border),0_1px_2px_rgb(0_0_0/0.08)]" />
                ) : null}
                <span className="relative">{f}</span>
              </button>
            ))}
          </div>
        </LayoutGroup>

        <ol className="relative mt-8">
          <span aria-hidden className="absolute bottom-2 left-[5px] top-2 w-px bg-border sm:left-[143px]" />
          <AnimatePresence initial={false} mode="popLayout">
            {shown.map((e, i) => {
              const isOpen = open === e.version;
              return (
                <motion.li
                  key={e.version}
                  layout={!reduce}
                  initial={reduce ? { opacity: 0 } : { opacity: 0, y: 8 }}
                  animate={{ opacity: 1, y: 0 }}
                  exit={{ opacity: 0 }}
                  transition={{ type: "spring", stiffness: 380, damping: 34 }}
                  className="relative grid gap-2 pb-8 pl-6 sm:grid-cols-[128px_1fr] sm:gap-8 sm:pl-0"
                >
                  <div className="text-xs text-muted-foreground sm:pt-3.5 sm:text-right">
                    <time>{e.date}</time>
                    <span className="ml-2 font-mono sm:ml-0 sm:mt-0.5 sm:block">v{e.version}</span>
                  </div>
                  <span aria-hidden className={cn("absolute left-0 top-1 size-[11px] rounded-full border-2 border-background sm:left-[138px] sm:top-[18px]", i === 0 && filter === "All" ? "bg-foreground" : "bg-muted-foreground/40")} />
                  <div className="rounded-lg border border-border bg-card shadow-[inset_0_1px_0_rgb(255_255_255/0.04),0_1px_2px_rgb(0_0_0/0.05)] transition-shadow hover:shadow-[inset_0_1px_0_rgb(255_255_255/0.04),0_1px_2px_rgb(0_0_0/0.05),0_12px_24px_-16px_rgb(0_0_0/0.3)]">
                    <button
                      type="button"
                      aria-expanded={isOpen}
                      aria-controls={`cl-${e.version}`}
                      onClick={() => setOpen(isOpen ? null : e.version)}
                      className={cn("flex w-full items-start gap-3 rounded-lg p-4 text-left", ring)}
                    >
                      <div className="min-w-0 flex-1">
                        <div className="flex flex-wrap gap-1.5">
                          {e.kind.map((k) => (
                            <span key={k} className={cn("rounded px-1.5 py-0.5 text-[11px] font-medium", tone[k])}>{k}</span>
                          ))}
                        </div>
                        <h3 className="mt-2 text-[15px] font-semibold tracking-tight">{e.title}</h3>
                        <p className="mt-1 text-[13px] text-muted-foreground">{e.summary}</p>
                      </div>
                      <motion.span animate={{ rotate: isOpen ? 180 : 0 }} className="mt-0.5 text-muted-foreground">
                        <ChevronDown className="size-4" aria-hidden />
                      </motion.span>
                    </button>
                    <AnimatePresence initial={false}>
                      {isOpen ? (
                        <motion.div
                          id={`cl-${e.version}`}
                          initial={{ height: 0, opacity: 0 }}
                          animate={{ height: "auto", opacity: 1 }}
                          exit={{ height: 0, opacity: 0 }}
                          transition={reduce ? { duration: 0 } : { type: "spring", stiffness: 380, damping: 36 }}
                          className="overflow-hidden"
                        >
                          <ul className="space-y-2 border-t border-border px-4 py-3.5">
                            {e.details.map((d) => (
                              <li key={d.text} className="flex gap-2.5 text-[13px]">
                                <span className={cn("mt-px h-fit shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium", tone[d.kind])}>{d.kind}</span>
                                <span className="text-foreground/85">{d.text}</span>
                              </li>
                            ))}
                          </ul>
                        </motion.div>
                      ) : null}
                    </AnimatePresence>
                  </div>
                </motion.li>
              );
            })}
          </AnimatePresence>
        </ol>
      </div>
    </section>
  );
}

Roadmap

Pro

A public roadmap in three columns, in progress, up next and exploring, with a vote button on every item that counts and holds its state.

The source for this block is part of Truffle Pro.