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 * as React from "react"

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

// A fixed clock and zone keep the sample's "Today" and "Yesterday" stable.
const now = Date.UTC(2026, 10, 26, 15, 30)
const at = (daysAgo: number, hour: number, minute: number) =>
  Date.UTC(2026, 10, 26 - daysAgo, hour, minute)

const ana = { id: "u1", name: "Ana Ruiz" }
const dee = { id: "u2", name: "Dee Park" }
const li = { id: "u3", name: "Li Wei" }
const system = { id: "system", name: "Northwind", kind: "system" as const }

const firstPage: AuditLogEntry[] = [
  {
    id: "e1",
    actor: ana,
    action: "changed the plan of",
    target: { label: "Northwind Labs" },
    category: "Billing",
    timestamp: at(0, 15, 18),
    changes: [
      { label: "Plan", before: "Team", after: "Business" },
      { label: "Seats", before: 12, after: 20 },
    ],
    details: [
      { label: "IP address", value: "203.0.113.24", mono: true },
      { label: "Request", value: "req_8f2c41a9", mono: true },
    ],
  },
  {
    id: "e2",
    actor: dee,
    action: "updated access for",
    target: { label: "Design team" },
    category: "Members",
    timestamp: at(0, 13, 2),
    changes: [
      {
        kind: "list",
        label: "Members",
        added: ["Li Wei", "Sam Cole"],
        removed: ["Owen Wright"],
      },
    ],
  },
  {
    id: "e3",
    actor: system,
    action: "rotated the signing key for",
    target: { label: "Production webhooks" },
    category: "Security",
    timestamp: at(0, 9, 0),
  },
  {
    id: "e4",
    actor: li,
    action: "edited",
    target: { label: "Invoice INV-2041" },
    category: "Billing",
    timestamp: at(1, 17, 45),
    changes: [
      {
        label: "Billing email",
        before: "accounts@northwind.example",
        after: "billing@northwind.example",
      },
      { label: "PO number", before: "", after: "PO-7781" },
      { label: "Due date", before: "Dec 1", after: "Dec 15" },
      { label: "Memo", before: "Net 30", after: "Net 45" },
      { label: "Auto-charge", before: true, after: false },
    ],
  },
  {
    id: "e5",
    actor: ana,
    action: "turned on single sign-on for",
    target: { label: "Northwind Labs" },
    category: "Security",
    timestamp: at(1, 10, 12),
    changes: [{ label: "SAML SSO", before: false, after: true }],
  },
]

const olderPage: AuditLogEntry[] = [
  {
    id: "e6",
    actor: dee,
    action: "invited",
    target: { label: "hana@atlas-works.jp" },
    category: "Members",
    timestamp: at(4, 16, 20),
    changes: [{ label: "Role", before: null, after: "Editor" }],
  },
  {
    id: "e7",
    actor: li,
    action: "deleted the API key",
    target: { label: "Staging deploys" },
    category: "Security",
    tone: "danger",
    timestamp: at(4, 11, 5),
  },
]

export default function AuditLogDemo() {
  const [entries, setEntries] = React.useState(firstPage)
  const loaded = entries.length > firstPage.length

  return (
    <div data-theme="light">
      <AuditLog
        entries={entries}
        now={now}
        timeZone="UTC"
        locale="en-US"
        filterable
        hasMore={!loaded}
        onLoadMore={() =>
          new Promise<void>((resolve) => {
            window.setTimeout(() => {
              setEntries((current) => [...current, ...olderPage])
              resolve()
            }, 700)
          })
        }
        className="max-w-2xl"
      />
    </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