# Docs, prompt

- **[Sections](/blocks/)**
- **[Docs](/blocks/docs/)**
- **Docs, prompt**

A prompt to copy, with {variables} highlighted. The first action copies the prompt; the others are links (Open in Claude, ChatGPT, v0).

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/docs-prompt
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/docs-prompt';
  ```

Also called

- docs/prompt

- **About**: A prompt to copy, with {variables} highlighted. The first action copies the prompt; the others are links (Open in Claude, ChatGPT, v0). An optional result image shows what it produced.
- **Category**: Documentation sections: headers, install panels, props tables, previews. New project? Set it up once: /get-started/installation.

## Notes

- **When to use it**: A prompt a reader copies into an AI tool, with {variables} highlighted. For a shell command to copy, use `docs-install`.
- **Writing for it**: - The prompt holds 1500 characters and line breaks are kept. Wrap the parts a reader must change in curly braces so they are highlighted as variables.
- The first action is the copy button and the other links, up to 4 in all, open the prompt in outside tools. Label the first one Copy prompt, not a link text.
- The label above the prompt holds 20 characters. Add a result image and a caption of 160 characters to show what the prompt produces.
- **Watch out for**: The copy button copies the raw prompt text, braces included, not the highlighted version. While editing, the variable highlight is switched off so the text can be changed.

## Pairs well with

- **[Docs, page header](/blocks/docs/header)**
- **[Docs, preview frame](/blocks/docs/preview-frame)**
- **[Docs, related links](/blocks/docs/related)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import DocsPrompt from '@/components/klarhimmel/blocks/docs-prompt';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <DocsPrompt props={{
          "title": "Name this task",
          "description": "Say what to fill in, then where to paste it.",
          "label": "Prompt name",
          "prompt": "Build a {thing} for {audience}. Show {parts} in {format}, ordered {order}. Mark {highlight} as the main point. End with {closing} and one call to action: {cta}.",
          "actions": [
            {
              "label": "Main action",
              "href": ""
            },
            {
              "label": "Second action",
              "href": "#claude"
            },
            {
              "label": "Third action",
              "href": "#chatgpt"
            }
          ],
          "result": {
            "src": "/pictures/scr-settings.avif",
            "alt": "A settings panel",
            "srcDark": "/pictures/scr-settings-dark.avif"
          },
          "resultCaption": "Say in one line what a good result looks like here."
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

- **title**: Text, up to 60 characters.
- **description**: Text, up to 300 characters.
- **label**: Text, up to 20 characters.
- **prompt**: Text, up to 1500 characters.
- **actions**: List of up to 4.
- **result**: See the type.
- **resultCaption**: Text, up to 160 characters.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/docs/preview-frame)

[Next](/blocks/docs/props-table)
