Audit Trail
Evidence per event, and it flags its own hash breaks.
PROGet Audit Trail and 168 other Pro components with pro lifetime — Get Pro
- Category
- Documents
- Access
- ProPro · unlocked
- Source
- 659 lines · one file
The decision inside it
The trail reports its own breaks
If the document hash changes between two events, the document changed in between. A record that cannot contradict itself is decoration, not evidence.
When to use it
Use Audit Trail for the signing history of a document: who sent, viewed, signed or declined it and when, with location, device and the document hash, and an export.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Audit Trail for this.
Install it: npx shadcn@latest add @liro/audit-trail
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/audit-trail.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { AuditTrail, type AuditEvent } from "@/components/ui/audit-trail";
const events: AuditEvent[] = [
{ id: "1", kind: "sent", actor: { email: "michael@madgixs.com", name: "Michael Carter" }, at: "2026-10-01T09:12:00Z" },
{ id: "2", kind: "signed", actor: { email: "ada@vertically.dev", name: "Ada Moss" }, at: "2026-10-02T14:40:00Z", location: "Berlin, DE" },
];
export function DocHistory({ exportPdf }: { exportPdf: () => void }) {
return <AuditTrail title="Audit trail" documentName="Vertically MSA" events={events} onExport={exportPdf} />;
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
look | Look | No | "layered" (default): the record rests as a card in a tray, the document's standing in the strip under it. "flat": one card, the strip as its floor. |
title | string | No | – |
documentName | string | No | The document these events belong to. |
events | AuditEvent[] | No | – |
loading | boolean | No | Waiting on the server. Shows skeleton rows rather than an empty state. |
defaultExpanded | boolean | No | Start with every row's evidence open. |
filterThreshold | number | No | Show the filter control. Off below a handful of events. |
onExport | () => void | Promise<void> | No | Called when the certificate is requested. Given, a Download button appears; the promise keeps the button in its working state until it settles. |
onClose | () => void | No | Given, the header grows a close button. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themeavatartooltipAccessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances