Componenteditors0.83 KB gzipZero dependencies
Audit Log
Audit trail with actor avatars, color-coded action badges and timestamps.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add audit-logOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { AuditLog } from "@/components/ui/audit-log"; <AuditLog />Source code
audit-log.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxaudit-log.tsx75 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type AuditAction = "create" | "update" | "delete" | "login" | "export"; export interface AuditEntry { id: string; actor: string; initials: string; action: AuditAction; target: string; time: string; ip?: string;} export interface AuditLogProps extends React.HTMLAttributes<HTMLDivElement> {Props
| Prop | Type | Description |
|---|---|---|
| entries | AuditEntry[] | Configures entries. (Default: []) |
| filter | AuditAction | "all" | Shows all actions if omitted |