Secret Reveal

Masked secret field for API keys with an eye toggle to reveal or hide the value and a copy button for the full key. Monospace, compact, built with Tailwind.

src/registry/ui/secret-reveal.tsx/r/secret-reveal.json
md_live_••••••••9f2a

Reveal

Installation#

bash
npx shadcn@latest add @minidev/secret-reveal

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/secret-reveal.json

Usage#

tsx
import { SecretReveal } from "@/components/ui/secret-reveal"

export function Example() {
  return (
    <SecretReveal />
  )
}

API reference#

SecretReveal props
PropTypeDefault
valuestring"md_live_••••••••9f2a"
revealedValuestring"md_live_8k2m9f2a"
classNamestring-

Dependencies#

npm

lucide-react
All Developer tool UI components for React