Audit log (Pro)
ProIncluded in $99Who did what, in sentences, with agents and keys told apart from people, the changes behind each event, and export.
On this page
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { AuditLog } from "@/components/ui/chatcn/pro/audit-log"
<AuditLog
events={[
{
id: "evt_1",
at: "2026-03-18T14:05:00Z",
actor: { kind: "member", name: "Maya Lindqvist" },
action: "policy.model_blocked",
summary: "blocked Claude Opus 5.5 for the workspace",
category: "settings",
ip: "81.214.6.20",
location: "Stockholm, SE",
changes: [{ field: "Code default", from: "Claude Opus 5.5", to: "Claude Sonnet 5.5" }],
},
]}
categories={[{ id: "settings", label: "Settings" }, { id: "agents", label: "Agents" }]}
hasMore={cursor !== null}
onLoadMore={loadOlder}
/>Each event reads as a sentence: the actor in bold and what they did. Agents and API keys have their own marks and name the person they acted for, so work done by AI is never mistaken for work done by hand. Events are grouped by day under sticky headings. Open one to see what changed in a before and after table, the event name, the exact time with its time zone and where it came from. Filter by category, by kind of actor and by text; Export downloads a CSV of exactly the events that match, or pass onExport to do it on your server. Load older pages in from your cursor.
Examples
States
Props
| Prop | Type | Notes |
|---|---|---|
events | AuditEvent[] | { id, at, actor, action, summary, category, ip?, location?, changes? } |
categories | { id, label }[] | The category filter |
hasMore, loadingMore, onLoadMore | Older events | |
onExport | (events) => void | Default downloads a CSV of the filtered events |
now, locale | Today and Yesterday, and times | |
labels | Partial<AuditLogLabels> | Every string, for translation |
Accessibility
- Each event is a disclosure button that reports whether it is open.
- Changes are a real table with row headers.
- Category filters are toggle buttons that report their state; the actor filter is a radio group.
Motion
The chevron turns 90 degrees over 150 ms. Nothing else moves.