Skip to content

CopyPrompt

Last updated View as MarkdownAgent setup

The CopyPrompt component is used 1 times on 1 pages.

See all examples of pages that use CopyPrompt

Used 1 times.

Pages

Partials

    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

    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?