# Access Audit Log block

> Day-Grouped Audit Log Timeline with Expandable Event Details and CSV Export

Full-page audit timeline grouping access events by day with severity badges, expandable details, type filters, and CSV export. ReUI Timeline, Frame, Badge; shadcn Avatar, Button, Collapsible, Select, ToggleGroup. Activity log, compliance, access.

- Type: Pro block
- Category: [Users](https://web.dev.reui.io/blocks/solutions/users.md)
- Page: https://web.dev.reui.io/blocks/solutions/users/solution-users-6
- MCP: `get_block("solution-users-6")`
- Built with: Avatar, Badge, Button, Collapsible, Empty, Frame, Select, Tabs, Timeline
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Auth, role, SSO, session and API events that expand to actor, source IP and session id, each with a copyable reference

## Agent notes

- `AUDIT_DAYS` holds the sample day groups and events, each with a fixed `ref`, `ip` and `location`
- The date range Select only stores `range` in state and never filters `AUDIT_DAYS`; only the type tabs do
- `handleExport` only toasts that a CSV is queued for the visible events and builds no file or link

## When not to use

- A feed of customer calls, emails, meetings and tasks grouped by day: use [Activity Timeline](https://web.dev.reui.io/blocks/solutions/crm/solution-crm-5.md) (`get_block("solution-crm-5")`)
- A finance activity log with actor avatars as nodes and links to records: use [Finance Activity](https://web.dev.reui.io/blocks/application/timeline/timeline-3.md) (`get_block("timeline-3")`)

## Third-party libraries

- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/solution-users-6
```

## About Users blocks

### When to use

- Workspace admin pages for people: a members directory, one member's record and the invitations queue
- Access control work: a role by permission matrix, just in time access requests and a day grouped audit log
- Enterprise sign-in settings for SSO providers, SCIM provisioning, 2FA, session limits and email domains

### When not to use

- A person editing their own account: avatar, name, email, password and notification choices: use the [Profile blocks](https://web.dev.reui.io/blocks/application/profile.md)
- A table section of your own records, with no roles, sign-in methods or invites around it: use the [Base blocks](https://web.dev.reui.io/blocks/data-grid/base.md)
- Notification, appearance or integration options, with no people or SSO to manage: use the [Settings blocks](https://web.dev.reui.io/blocks/application/settings.md)

### Agent notes

- Every page.tsx sets a padded `min-h-svh` wrapper, and page.tsx or the root caps the max width; drop both inside your app shell
- Feedback goes through sonner `toast` and no block mounts a Toaster, so render one in your layout or no message appears
- No block sends a request or writes storage: state sits in `useState` or uncontrolled inputs, so every change resets on reload

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
