Ballmac UI home

Audit 1: audit log

An audit log you can search: who did what to what, when and from where, filters with counts, failed attempts written out, rows that open to show exactly which values changed, show-more paging and an export of what the filter shows.

State

The normal view. Pick a state to see what the block shows while it loads, is empty or fails.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/audit-1

Usage

Example: audit-1-demo.tsx
"use client"

import { Audit1 } from "@/components/ballmac/blocks/audit-1/audit-1"

export default function Audit1Demo() {
  return <Audit1 onExport={() => new Promise((r) => setTimeout(r, 400))} defaultOpenId="e5" />
}

States

Pass state and the block does the rest: skeletons that match its layout, a clear empty message, an error you can retry, and announcements for screen readers.

  • Loading

    Skeleton rows under the real heading, announced as loading.

    state="loading"
  • No activity yet

    Says what will appear and when; emptyState sets the copy. A search or filter with no match says so with Clear filters.

    state="empty"
  • Could not load

    An alert saying nothing was changed, with Try again (onRetry).

    state="error"

Dependencies

Use with AI

An audit log. <Audit1 events={[{ id, time, actor: { name, email? }, action, category: 'signin' | 'permissions' | 'data' | 'billing', target, ip?, place?, result?: 'failed', changes?: [{ field, from, to }] }]} onExport={(events) => Promise} />. Search and the kind filter narrow the list and the count; Export sends what is currently shown. Rows with changes open to show from and to. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Audit 1: audit log (@ballmac/audit-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • An admin area where owners review security and data activity
  • A compliance screen that needs an exportable trail

Not for

  • A user's own activity feed; use activity-feed
  • The live output of a process; use log-stream
  • Agent guardrail checks; use guardrail-feed

Registry JSON: https://ui.ballmac.com/r/audit-1.json

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.