Analysis report
The result of an AI analysis, honest and calm: one sentence and an overall status, findings grouped by status with what was observed and what it may indicate, what the report did not examine, the next steps and where the result comes from.
import { AnalysisReport, groupFindings, countByStatus, reportToMarkdown, reportToJson } from "@krizaka/ui/analysis-report";Web and mobile — the same component for React and React Native. Beta: its API may still change in a minor version.
Why it is here. Yomizaka (the report of a check, krizaka/yomizaka#314), Orazaka's Studios, then every product that shows an Orazaka analysis.
When to use
- Showing what an Orazaka analysis found in a document, a lease, an identity check or a moderated item, in any product.
- Any result that has findings of different gravity, a list of limits and a provenance the reader may need to cite.
When not to use
- A single yes / no outcome with no findings.Use instead: Alert
- A chat answer that streams as prose.Use instead: Chat
- A log of what happened in order.Use instead: Activity feed
Installation
Install
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Import
import { AnalysisReport, groupFindings, countByStatus, reportToMarkdown, reportToJson } from "@krizaka/ui/analysis-report";Examples
A document validation
Header, findings grouped by status, limits and next steps in two columns, provenance, copy as JSON or Markdown.
While the run is open
streaming marks the report busy and announces each finding as it arrives; the copy actions are hidden.
Props
The result of an AI analysis: summary, findings by status, limits, next steps, provenance, copy as JSON or Markdown.
| Prop | Type | Default | Description |
|---|---|---|---|
findingsrequired | readonly AnalysisFinding[] | — | The findings, in any order: the report groups them by status, the most serious first. |
labelsrequired | AnalysisReportLabels | — | Every word the report prints, passed translated (statuses, section titles, buttons). |
statusrequired | "inconsistent" | "attention" | "unverified" | "consistent" | — | The overall status of the report. |
summaryrequired | string | — | One sentence: the answer. |
titlerequired | string | — | The studio's name (« Document validation »). |
hideActions | boolean | — | Hides the copy buttons (a read-only embed). |
limits | readonly string[] | — | « What this report did not examine ». |
mark | ReactNode | — | The pack's bird (a mark of @krizaka/ui/mascots), shown beside the studio's name. |
nextSteps | readonly string[] | — | What to do next, one step per item. |
onLocate | ((finding: AnalysisFinding) => void) | — | Makes a finding's location a button (scroll a document viewer to it). |
provenance | AnalysisProvenance | — | Where the result comes from: model, run id, duration, version. |
streaming | boolean | — | Findings are still arriving: the list is announced politely and marked busy. |
Accessibility
- A section named by the studio's title; each status group is a labelled section with a heading, each finding a list item.
- A status is always a word with its dot, never a colour alone.
- The copy result and the streaming state are said in a polite status region; the list is
aria-busywhile streaming. - The evidence is a native
details: it works without script and keeps the focus on its summary.
Keyboard
| Keys | Action |
|---|---|
| Tab / Enter | Reaches the copy buttons, the locations and the folded evidence. |
Best practices
- Order is the point: the most serious group comes first, then the calmer ones; never sort by code.
- Keep « may indicate » honest: it carries the caveat (« not proof of tampering »), never a verdict.
- Say what the report did not examine, in the same weight as the findings; the limits are part of the result.
- Pass every word through
labelsfrom your messages (@krizaka/i18n); the package ships none. - While the run is open, set
streaming: findings are announced politely as they arrive. - Give
onLocateto scroll a document viewer to a finding's place; without it the location is plain text. - Examples and tests use demo data only.
Related components
Generated from the code of @krizaka/ui 3.63.1: its meta.ts, its examples and its types.Edit this documentation on GitHub