# Operations, access detail

- **[Sections](/blocks/)**
- **[Application](/blocks/app/)**
- **Operations, access detail**

An access record with a copyable code, explicit validity, permissions and recorded history; unknown permissions remain distinct from an empty list.

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/app-access-detail
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/app-access-detail';
  ```

Also called

- app/access-detail

- **Category**: Interface sections for signed-in products. New project? Set it up once: /get-started/installation.

## Notes

- **When to use it**: Inspect one authorized access record with its code, validity, permissions and locally recorded history. Use app-data-table for the list from which the host selects that record.
- **Writing for it**: - Pass only the code the current viewer is authorized to see. Write the validity explicitly, including the end time; this presentation block does not determine whether a credential is active.
- Use null permissions when they could not be read, an empty array when no doors are allowed, and a populated array for confirmed access. Keep sourceNote explicit about the history coverage.
- **Watch out for**: The copy affordance only copies the supplied string. It never creates credentials, renews validity or writes a journal event; those operations and their authorization belong in the host application.

## Pairs well with

- **[Operations, daily summary](/blocks/app/operations-summary)**
- **[App, data table](/blocks/app/data-table)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import AppAccessDetail from '@/components/klarhimmel/blocks/app-access-detail';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <AppAccessDetail props={{
          "eyebrow": "Selected access",
          "title": "Name the access",
          "description": "Say what these details cover and what to confirm before the code is shared.",
          "code": "XXXX-0000",
          "copyLabel": "Copy the access code",
          "validity": "Valid 00 Jan–00 Jan, until 00:00",
          "note": "Say where the codes and validity come from and what this block does not do.",
          "permissionsTitle": "Opens",
          "permissions": [
            "Name the first place",
            "Name the second place",
            "Name the third place"
          ],
          "unknownPermissions": "Say that permissions could not be read and what not to assume.",
          "emptyPermissions": "Say that nothing is opened.",
          "historyTitle": "Recorded history",
          "history": [
            {
              "time": "1 Jan · 00:00",
              "event": "Say what happened and who did it"
            },
            {
              "time": "1 Jan · 00:00",
              "event": "Say the next thing that happened"
            }
          ],
          "emptyHistory": "Say that no events are recorded.",
          "source": "Name the source",
          "sourceNote": "Say what the history covers and what it leaves out of the full record.",
          "action": {
            "label": "Open the settings",
            "href": "https://example.com/access"
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

- **eyebrow**: Text, up to 60 characters.
- **title**: Text, up to 120 characters.
- **description**: Text, up to 300 characters.
- **code**: Text, up to 40 characters.
- **copyLabel**: Text, up to 60 characters.
- **validity**: Text, up to 120 characters.
- **note**: Text, up to 200 characters.
- **permissionsTitle**: Text, up to 60 characters.
- **permissions**: See the type.
- **unknownPermissions**: Text, up to 160 characters.
- **emptyPermissions**: Text, up to 160 characters.
- **historyTitle**: Text, up to 60 characters.
- **history**: List of up to 8. Each item: time, event.
- **emptyHistory**: Text, up to 160 characters.
- **source**: Text, up to 100 characters.
- **sourceNote**: Text, up to 200 characters.
- **action**: See the type.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/docs/table)

[Next](/blocks/app/assistant-approval)
