import "capsomer/tokens.css";
import "capsomer/secret-reveal.css";
import { SecretReveal } from "capsomer/react/secret-reveal";
Usage
<section class="cap-secret" aria-labelledby="k-h">
<h2 class="cap-secret-title" id="k-h">Your new API key</h2>
<pre class="cap-secret-value" tabindex="-1" aria-labelledby="k-h" aria-describedby="k-n">sample_live_4f9c...</pre>
<div class="cap-secret-foot">
<p class="cap-secret-note" id="k-n">This will not be shown again. Copy it now and store it somewhere safe.</p>
<!-- the copy button -->
</div>
</section>
API reference
SecretReveal
Prop
Type
Required
Does
title
ReactNode
Yes
secret
string
Yes
note
ReactNode
copy
ReactNode
The copy control: Capsomer's CopyButton with text={secret} and a name ("Copy API key").