CopyPrompt

Last updated Oct 2, 2026 The CopyPrompt component is used 1 times on 1 pages.

<details>

<summary>

See all examples of pages that use CopyPrompt

</summary>

Used 1 times.

Pages

  • <a href="https://developers.cloudflare.com/style-guide/build-the-page/components/copy-prompt/">/style-guide/build-the-page/components/copy-prompt/</a>-<a href="https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/style-guide/build-the-page/components/copy-prompt.mdx">Source</a>

Partials

</details>

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.

Copy promptCopied!

Import

import { CopyPrompt } from "~/components";

Usage

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.

<CopyPrompt> Props

text

type: string

The prompt to display. Selecting Copy prompt copies this text to the clipboard.

Was this helpful?

YesNo

On this page

CopyPrompt - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/style-guide/build-the-page/components/copy-prompt/#page","headline":"CopyPrompt","description":"Display a prompt that readers can copy into their AI coding agent.","url":"https://developers.cloudflare.com/style-guide/build-the-page/components/copy-prompt/","inLanguage":"en","image":"https://developers.cloudflare.com/style-guide/build-the-page/components/copy-prompt/og.png?v=4b01e9bd2e069c8b","dateModified":"2026-10-02","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Display formatted curl command examples. title: CURL image: https://developers.cloudflare.com/style-guide/build-the-page/components/curl/og.png?v=aa6833a0bc4b039a


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/style-guide/llms.txt
Use this file to discover all available pages before exploring further.