terra vidhal

Decision Log

Component

About

A decision log with status filters, option cards with pros and cons, advisory support votes, chosen-option tracking, rationale validation, multiple editable decisions, delete with undo and a saved log.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Decision Log to your project and fits it to your theme.

Code

How Decision Log is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

/**
 * PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
 */

import { DecisionLog, type Decision } from "@/components/ui/decision-log";

const DECISIONS: Decision[] = [
  {
    id: "d1",
    title: "Move the weekly demo to Thursday",
    context: "Tuesday demos collide with the design critique and half the team joins late.",
    owner: "Amara",
    date: "12 Feb",
    status: "decided",
    chosenOptionId: "d1b",
    rationale: "Thursday keeps a buffer after the build freeze and avoids the critique slot.",
    options: [
      { id: "d1a", label: "Keep Tuesday", pros: "No calendar change; demo stays early in the week.", cons: "Still overlaps the critique and loses attendance.", votes: 1 },
      { id: "d1b", label: "Move to Thursday", pros: "Better attendance; more time to fix blockers.", cons: "Demo lands one day before the release review.", votes: 4 },
    ],
  },
  {
    id: "d2",
    title: "Adopt a shared component budget",
    context: "Pages keep growing and nobody agrees on when a new component is justified.",
    owner: "Theo",
    date: "11 Feb",
    status: "proposed",
    chosenOptionId: null,
    rationale: "",
    options: [
      { id: "d2a", label: "Lightweight budget", pros: "Low overhead, easy to start.", cons: "May not change behaviour on its own.", votes: 2 },
      { id: "d2b", label: "Strict budget with review", pros: "Clear limits and a shared forum.", cons: "More process for every page.", votes: 3 },
      { id: "d2c", label: "No formal budget", pros: "Maximum speed for small changes.", cons: "The same debate will return next quarter.", votes: 0 },
    ],
  },
  {
    id: "d3",
    title: "Keep the async Friday update",
    context: "The written update replaced a recurring status meeting.",
    owner: "Lena",
    date: "07 Feb",
    status: "revisit",
    chosenOptionId: "d3a",
    rationale: "Written updates work, but two weeks in the thread is getting long.",
    options: [
      { id: "d3a", label: "Keep it written", pros: "Time-zone friendly and easy to skim.", cons: "Threads get long and decisions get buried.", votes: 3 },
      { id: "d3b", label: "Add a short live stand-up", pros: "Faster decisions on blockers.", cons: "Costs another synchronous slot.", votes: 1 },
    ],
  },
  {
    id: "d4",
    title: "Pick the new release checklist format",
    context: "The checklist moved from a doc to a board last sprint.",
    owner: "Priya",
    date: "05 Feb",
    status: "proposed",
    chosenOptionId: null,
    rationale: "",
    options: [
      { id: "d4a", label: "Keep the board", pros: "Visible owners and status at a glance.", cons: "Hard to read in a long thread.", votes: 2 },
      { id: "d4b", label: "Return to a doc", pros: "Easy to annotate and archive.", cons: "Owners and status get stale.", votes: 1 },
    ],
  },
];

export default function DecisionLogDemo() {
  return (
    <main className="flex min-h-screen w-full items-start justify-center bg-gradient-to-b from-muted/40 via-background to-background px-4 py-8 sm:px-6">
      <DecisionLog decisions={DECISIONS} title="Product decision log" />
    </main>
  );
}

Dependencies

More by terra vidhal

View all
  • Project Timeline

    Project Timeline

    30
  • Kanban Board

    Kanban Board

    20
  • Gravity Stars Background

    Gravity Stars Background

    20
  • Booking Calendar

    Booking Calendar

    18
  • Notification Center

    Notification Center

    16
  • Audio Waveform

    Audio Waveform

    16
  • Kpi Counter

    Kpi Counter

    16
  • Topographic Lines

    Topographic Lines

    16

Explore more

Part of PrequelUI Animate — browse the full library on 21st.dev.