Radix
A SaaS composite for managing API keys. Renders a Card with key rows showing name, masked prefix, scopes, and dates. Includes APIKeyCreateDialog with scope checkboxes and APIKeyReveal for the one-time key display with copy.
Basic
import { APIKeyManager } from '@primstack/ui/api-key-manager'
<APIKeyManager
keys={[{ id: '1', name: 'Production', prefix: 'pk_live_abc', createdAt: '2024-01-01' }]}
onCreateKey={(name, scopes) => createKey(name, scopes)}
onRevokeKey={(id) => revokeKey(id)}
/>With scopes
import { APIKeyManager } from '@primstack/ui/api-key-manager'
<APIKeyManager
keys={apiKeys}
availableScopes={['read', 'write', 'admin']}
onCreate={createKey}
onRevoke={revokeKey}
/>