Introducing shieldcn — README badges, shadcn style.

Check it out

AI Copy Button

Split button with a primary copy action and a dropdown of AI destinations.

radix-uilucide-reactclass-variance-authority
Loading...

Installation

$ shadcn add @jalco/ai-copy-button

Usage

import { AiCopyButton } from "@/components/ai-copy-button"
<AiCopyButton />

Examples

Variants

Default

Secondary

Outline

Ghost

Sizes

Small

Default

Large

API Reference

AiCopyButton

PropType

AiTarget (custom target)

PropType

Notes

  • Client component. Uses the Clipboard API and Radix DropdownMenu for keyboard navigation, focus management, and screen reader support.
  • Built-in targets. Five built-in targets are included: Markdown, v0, ChatGPT, Claude, and Gemini. Pass a subset to show only what you need.
  • Custom targets. Add your own targets with a custom AiTarget object — bring your own icon and action.
  • Icon library. Uses Lucide icons by default. Since this is copy-paste code, you can swap the imports if your project uses a different icon library.