API Key Display
Display and manage API keys
SaaSTenant Admin
Overview
ApiKeyDisplay renders an API key inside a card with a copy button. When no keyValue is provided, the key is masked with bullet characters. The showOnce flag displays an amber warning indicating the key will not be shown again. Copying writes to the clipboard and shows a brief "Copied" confirmation.
Usage
import { ApiKeyDisplay } from "@leanicon/web-builder-library/saas";
<ApiKeyDisplay
keyPrefix="sk_live_"
keyValue="sk_live_4xT9mKpQrNbLhWsJdYvFcZeUoAiXgBl"
onCopy={() => console.log("copied")}
/>;Variants
Default
API Key
sk_live_4xT9mKpQrNbLhWsJdYvFcZeUoAiXgBlDark
API Key
sk_live_4xT9mKpQrNbLhWsJdYvFcZeUoAiXgBlShow Once
API Key Generated
This key will only be shown once. Make sure to copy it now.
sk_live_4xT9mKpQrNbLhWsJdYvFcZeUoAiXgBlMasked
API Key
sk_live_••••••••••••••••••••••••••••••••Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
keyValue | string | — | No | |
keyPrefix | string | — | Yes | |
onCopy | (() => void) | — | No | |
showOnce | boolean | false | No |