A copy-to-clipboard field that shows a monospace value with an icon or button trigger, animating a checkmark on copy.
Dependencies
Interaction Type
Hover field for micro-clicks; click to copy the value with tactile audio feedback. The icon morphs into a checkmark.
Props
Options you can pass to customize this component.
valueThe value to display and copy to clipboard.
labelOptional label displayed above the value.
onCopyCalled after the value is copied.
variantIcon-only with tooltip, or a labeled button. Defaults to "icon".
alignPosition of the copy action relative to the value. Defaults to "right".
disabledDisables copying.
Installation
How to use
import { InputCopy } from "@/components/ui/input-copy"
export function Demo() {
return <InputCopy label="API Key" value="sk-proj-a1b2c3d4e5f6" variant="button" />
}Source Code
Click the code icon in the top-right corner to view the source code.
License & Usage
// No code loaded.