The CopyPrompt component displays a one-line prompt next to a Copy prompt button. Use it when readers can complete a task by pasting a prompt into an AI coding agent, such as a quickstart that an agent can run for them.
Build a Cloudflare Worker that returns Hello World, then deploy it with Wrangler.
import { CopyPrompt } from "~/components";import { CopyPrompt } from "~/components";
<CopyPrompt text="Build a Cloudflare Worker that returns Hello World, then deploy it with Wrangler." />The prompt displays on a single line and is truncated if it does not fit, but the full text is always copied. Keep prompts short so readers can see what they are copying. For longer prompts, use a code block with txt as the language instead.
type: string
The prompt to display. Selecting Copy prompt copies this text to the clipboard.