honestui

Audit Log

Dashboards

About

Show who did what and when, grouped by day, with each change written out and the details one click away.

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

Code

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

Usage.tsx

"use client"
import "honestui/theme.css";

import { AuditLog, type AuditLogEntry } from "@/components/ui/honest-audit-log"

const now = Date.UTC(2026, 10, 26, 15, 30)

const money = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" })

const entries: AuditLogEntry[] = [
  {
    id: "r1",
    actor: { name: "Billing API", kind: "api" },
    action: "marked the invoice paid",
    timestamp: Date.UTC(2026, 10, 26, 14, 52),
    changes: [{ label: "Status", before: "Open", after: "Paid" }],
    details: [
      { label: "Payment", value: "pi_3QxL0aK2", mono: true },
      { label: "Source", value: "Card ending 4242" },
    ],
  },
  {
    id: "r2",
    actor: { name: "Ana Ruiz" },
    action: "applied a discount",
    timestamp: Date.UTC(2026, 10, 24, 9, 30),
    changes: [
      {
        label: "Total",
        before: 482000,
        after: 433800,
        render: (value) => money.format(Number(value) / 100),
      },
      { label: "Discount", before: null, after: "Loyalty 10%" },
    ],
  },
  {
    id: "r3",
    actor: { name: "Dee Park" },
    action: "created the invoice",
    timestamp: Date.UTC(2026, 10, 20, 16, 4),
  },
]

/** The history of one record, beside its form. The header is replaced to name the record. */
export default function AuditLogRecord() {
  return (
    <div data-theme="light">
      <AuditLog
        entries={entries}
        now={now}
        timeZone="UTC"
        locale="en-US"
        labels={{ title: "Invoice INV-2041 history" }}
        className="max-w-lg"
      />
    </div>
  )
}

Dependencies

More by honestui

View all
  • Chromatic Text Reveal

    Chromatic Text Reveal

    31
  • Schedule Builder

    Schedule Builder

  • Secret Row

    Secret Row

  • Undoable Action

    Undoable Action

  • OTP Field

    OTP Field

  • Audio Orb

    Audio Orb

  • AI Glow Border

    AI Glow Border

  • Metaballs

    Metaballs

More in Dashboards

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    736
  • Analytics Dashboard

    Analytics Dashboard

    80
  • Creator Dashboard

    Creator Dashboard

    215
  • Insights Dashboard

    Insights Dashboard

    43
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    419
  • serf dashboard

    serf dashboard

    144
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.7K
  • Halden — CRM Dashboard with Sales Pipeline

    Halden — CRM Dashboard with Sales Pipeline

    64