Audit Activity Log
A filterable audit trail section: a row of pill filters for action type (All, Create, Update, Delete, Access), each with a distinct icon and color, above a list of activity entries showing the actor's avatar and name, the resource that was touched, an action icon and label, and a relative timestamp. Built for admin dashboards, security pages, and workspace settings.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its avatar, avatar-initials dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/audit-activity-log.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/devtools/devtools11.tsx instead.
Usage
The file also exports devtools11Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Devtools11, devtools11Demo } from "@/components/blocks/devtools/devtools11"; export default function Page() { return <Devtools11 {...devtools11Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Audit activity log" | Section heading. |
| description | string | undefined | Section intro text below the heading. |
| entries | AuditEntry[] | [] | Audit log rows, in the order they should be displayed (newest first is conventional but not enforced). |
| className | string | none | Extra classes for the outer section element. |
Types
type AuditAction = "create" | "update" | "delete" | "access"; type AuditEntry = { id: string; actor: { name: string; avatar?: string }; action: AuditAction; resource: string; timestamp: string; };
Behavior notes
- The action-type filter row is genuinely functional ("use client" with real useState): clicking a filter narrows the visible entries to that action, or shows all of them for the "All" pill. There is no server round-trip; filtering happens against the entries already passed in.
- Action colors and icons are fixed by action name (create=emerald plus, update=sky pencil, delete=red trash, access=violet eye) and are not configurable per-entry beyond changing the action value.
- actor.avatar is optional; when omitted, the avatar falls back to initials built from the first letter of up to two space-separated words in actor.name, exactly like the About category's team grid.
- timestamp is a plain display string (e.g. "2 min ago", "Yesterday, 4:12 PM"); it is not computed from a real Date and will not update on its own.
- When a filter has no matching entries, the list renders a single centered "No activity matches this filter" message instead of an empty list.
More DevTools Blocks
View all →api-endpoints-sample-call
API Endpoints With Sample Call
Reference list of API endpoints paired with a live sample request and response panel.
cicd-pipeline-status
CI/CD Pipeline Status
Recent CI/CD pipeline runs with per-stage status chips and overall run badges.
code-diff-viewer
Code Diff Viewer
Unified code diff panel with a file header change summary and colored addition/deletion lines.
keyboard-shortcuts-reference
Keyboard Shortcuts Reference
Grouped keyboard shortcut reference with keycap-styled key combos.
performance-waterfall
Performance Waterfall
Network request waterfall chart with cascading timing bars colored by duration.
service-health-board
Service Health Board
Infrastructure status board with a live summary strip and per-service uptime, latency, and health.