Finding

Pro

One finding with its evidence attached (Candor's NarrativeBlock): severity as icon and word (never colour alone), what was found, the evidence it rests on, and what to do next when there's a clear step.

Markdown

Preview

Install

With the Candor CLI

First time? Get started sets up the registry and theme. Or with shadcn directly: npx shadcn@latest add @candor/finding

Brings in: data, locale, utils · npm: lucide-react@^1.67.0

Usage

TSX · The example above
"use client"

import { Finding } from "@/components/finding"
import type { Finding as FindingData } from "@/lib/data"

const findings: FindingData[] = [
  {
    id: "f1",
    severity: "critical",
    title: "Billing tests fail on the new discount rules",
    body: "Three tests in billing.test.ts fail when an invoice mixes annual and monthly discounts. This release changes that path.",
    evidence: [{ label: "billing.test.ts", detail: "3 failures" }, { label: "CI run", detail: "Nov 3, 09:12" }],
    action: "Hold the billing change until the fix passes; the rest can ship.",
  },
  {
    id: "f2",
    severity: "info",
    title: "The dark-mode flag is at 100% everywhere",
    body: "It has been fully on in Production and Staging for 41 days.",
    evidence: [{ label: "dark-mode", detail: "100% since Sep 25" }],
  },
]

export default function Example() {
  return (
    <div className="flex max-w-2xl flex-col gap-3">
      {findings.map((f) => (
        <Finding key={f.id} finding={f} />
      ))}
    </div>
  )
}

<Finding>

PropTypeDefaultDescription
findingrequiredFindingData—The finding: severity, title, what was found, its evidence and the next step if there is one.
headingLevel2 | 3 | 4 | 5 | undefined3The title's heading level. Defaults to 3, under a ReportSection's h2.
classNamestring | undefined—Extra classes for the outer element.

Strings

The fixed words, in English by default. Change any of them under finding in <LocaleProvider strings={{ … }}>; the table is exported as findingStrings.

KeyEnglish
criticalCritical
seriousSerious
warningWarning
infoNote
evidenceEvidence
nextNext: