Copy Id

Monospaced ID chip that copies its value to the clipboard on click and shows a check when done. Good for API keys, order IDs and record UUIDs.

src/registry/ui/copy-id.tsx/r/copy-id.json

Installation#

bash
npx shadcn@latest add @minidev/copy-id

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/copy-id.json

Usage#

tsx
import { CopyId } from "@/components/ui/copy-id"

export function Example() {
  return (
    <CopyId value="usr_8f2a91" />
  )
}

API reference#

CopyId props
PropTypeDefault
value*string-
classNamestring-

* required

Dependencies#

npm

lucide-react

Built from

No other MiniDev files

Examples#

All Developer tool UI components for React