API Key List
API keys with masked prefixes, scope badges, created, last used and expiry; a create dialog that reveals the new key once with a copy button; revoke behind a confirmation.
import { ApiKeyList } from "pleate/api-key-list";Keys for the Plate API
Create a key to see the reveal-once panel.
| Name | Key | Scopes | Last used | Expires | Revoke |
|---|---|---|---|---|---|
| NameProduction serverCreated Jul 18, 2026 | Keypl_8f3k2m1q_ | Scopesrecipes:readlists:write | Last used14 minutes ago | ExpiresJul 18, 2027 | |
| NameHome AssistantCreated Oct 6, 2026 | Keypl_c7d1x9we_ | Scopesrecipes:read | Last used3 days ago | ExpiresNever | |
| NameOld import scriptCreated Oct 11, 2025 | Keypl_q2z8n4ab_ | Scopesrecipes:write | Last usedNever used | ExpiresOct 11, 2026 |
Props
- keys
Shown as prefix_••••; expired keys are dimmed.
{ id, name, prefix, scopes, createdAt, lastUsedAt?, expiresAt? }[]- scopes / defaultScopes
Choices in the create dialog.
{ value, label, description? }[] / string[]- expiryOptions / defaultExpiry
Expiry select.
{ value, label, days | null }[] / stringdefault 30, 90, 365 days, never- onCreate
Resolve with the full key; throw to show an error.
({ name, scopes, expiresInDays }) => Promise<{ key }>- onRevoke
After confirmation; the row spins meanwhile.
(id) => void | Promise- loading / toolbar / now / locale
Skeleton, header slot, formatting.
boolean / ReactNode / Date / string- labels
Every visible string, for your wording or translation.
object
Accessibility
- The secret is shown once, selectable, with a copy button that announces "Copied".
- Revoking asks first; rows become labelled cards on phones.