Components › Blocks
API keys
A project's API keys, masked, with created and last-used dates, a create button and a confirmed revoke.
Installation
npx plankui@latest add api-keysUsage
import { ApiKeys } from "@/components/ui/api-keys";
<ApiKeys keys={keys} onCreate={createKey} onRevoke={revokeKey} />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| keys | { id, name, last4, prefix?, created, lastUsed? }[] | required | The keys, shown masked. |
| onCreate | () => void | Shows the Create key button. | |
| onRevoke | (id: string) => void | Called after the visitor confirms. |