Operations, access detail


Install
npx shadcn add @klarhimmel/app-access-detailDetailsAbout, usage, props and more
An access record with a copyable code, explicit validity, permissions and recorded history; unknown permissions remain distinct from an empty list.
Import
Import
- 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
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
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.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Selected access' | Text, up to 60 characters. |
title | string | 'Name the access' | Text, up to 120 characters. |
description | string | 'Say what these details cover and wh…' | Text, up to 300 characters. |
code | string | 'XXXX-0000' | Text, up to 40 characters. |
copyLabel | string | 'Copy the access code' | Text, up to 60 characters. |
validity | string | 'Valid 00 Jan–00 Jan, until 00:00' | Text, up to 120 characters. |
note | string | 'Say where the codes and validity co…' | Text, up to 200 characters. |
permissionsTitle | string | 'Opens' | Text, up to 60 characters. |
permissions | string[] | 3 items | See the type. |
unknownPermissions | string | 'Say that permissions could not be r…' | Text, up to 160 characters. |
emptyPermissions | string | 'Say that nothing is opened.' | Text, up to 160 characters. |
historyTitle | string | 'Recorded history' | Text, up to 60 characters. |
history | { time, event }[] | 2 items | List of up to 8. Each item: time, event. |
emptyHistory | string | 'Say that no events are recorded.' | Text, up to 160 characters. |
source | string | 'Name the source' | Text, up to 100 characters. |
sourceNote | string | 'Say what the history covers and wha…' | Text, up to 200 characters. |
action | Link | {…} | See the type. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |