Prompt
Use Prompt to present reusable AI instructions with copy, built-in open-in actions, custom destinations, icons, and compact display options.
The <Prompt> component turns a reusable set of instructions into a card readers can copy or open in a supported AI tool. Copy and open-in actions use the exact human-visible authored content between the tags.
Basic Usage
Every Prompt has a Copy action. The simplest version needs no props:
<Prompt>
Explain how API key rotation works for a developer using our REST API for the first time.
</Prompt>
Title and Description
Use title to label the task. The Mintlify-compatible description prop replaces the visible preview with a shorter summary. Copy and open-in actions still use the full human-visible content between the tags.
Draft a release note
<Prompt
title="Draft a release note"
description="Write a concise release note for a developer audience."
actions={["copy", "claude"]}
>
Write a release note for the new API key rotation endpoint.
- Address backend developers.
- Lead with the user benefit.
- Include one request example.
</Prompt>
Copy is always present. An explicit "copy" action is accepted for compatibility but never needed.
Prompt copies the exact human-visible authored content. In a prompt that contains Visibility, Jamdesk drops human-only wrapper tags from the copied text and keeps their contents. Agent-only subtrees are excluded. Jamdesk also excludes Visibility with an expression-valued for prop, or with an audience hidden by a later spread attribute. Its audience can't be determined statically. Visibility with no for prop, shorthand for, or an invalid literal audience stays visible. A Prompt hidden inside agent-only or expression/spread-obscured Visibility has no copyable source.
Open-in Actions
Add claude, cursor, chatgpt, perplexity, or gemini to let readers open the prompt in those tools. Each action shows its brand icon. The first valid open-in action appears beside Copy. The rest appear in the More menu.
Compare authentication flows
<Prompt
title="Compare authentication flows"
actions={["claude", "cursor", "chatgpt", "perplexity", "gemini"]}
>
Compare the session-token and API-key authentication flows in this repository.
List their security tradeoffs and recommend which flow each client type should use.
</Prompt>
Clicking an open-in action sends the full copyable prompt to the selected third party. Do not include secrets, personal data, or proprietary content unless you intend to share it under that provider's privacy policy. Copy does not open a third-party service.
Custom URL Actions
Custom actions take a label, an HTTPS or HTTP url, and an optional icon. Put {prompt} in a path segment, query value, or fragment to control where the URL-encoded prompt goes. If you omit the placeholder, Jamdesk adds a prompt query parameter.
Research this migration
<Prompt
title="Research this migration"
actions={[
{
label: "Search the web",
url: "https://www.google.com/search?q={prompt}",
icon: "magnifying-glass",
},
"claude",
]}
>
Compare this migration plan with the current public API contract. Identify
breaking changes, missing rollback steps, and tests needed before release.
</Prompt>
Custom action URLs must use credential-free http: or https: URLs. Jamdesk rejects other schemes, placeholders in origins or query keys, and final action URLs longer than 8,000 characters. Copy remains available when an open-in action is rejected.
Custom Icon
Set icon to a Font Awesome name, image URL or path, or inline SVG. Use iconType to select the style for an unprefixed Font Awesome name.
Plan a tutorial
<Prompt title="Plan a tutorial" icon="pen-nib" iconType="duotone">
Outline a hands-on tutorial that gets a new user from installation to a
successful API request in under ten minutes.
</Prompt>
See Icons for available names and styles.
Compact Displays
The preview shows up to three lines and scrolls for a longer prompt. The Expand control opens the full prompt. Set singleLine to clip the preview to one line. Copy and open-in actions still use the full human-visible prompt.
Summarize the API
Use hidePrompt with a title when the label alone gives readers enough context:
Generate a migration checklist
<Prompt title="Summarize the API">
Summarize the public API in five bullets:
- Authentication and token lifetimes.
- Pagination conventions.
- Rate limits and retry guidance.
- Error format and common codes.
- Versioning and deprecation policy.
</Prompt>
<Prompt title="Generate a migration checklist" hidePrompt actions={["claude"]}>
Create a migration checklist for moving from API v1 to v2. Include
prerequisites, code changes, validation steps, and rollback criteria.
</Prompt>
hidePrompt hides the preview only when title is set. Without a title, the prompt stays visible.
Props
ReactNodeThe prompt content between the opening and closing tags. Jamdesk preserves the exact human-visible authored Markdown for Copy and open-in actions. It also renders this content as the preview unless description replaces the preview or hidePrompt hides it. Visibility filtering follows the rules above.
stringLabel displayed in the card header. No title is shown by default.
stringCompact, inline-Markdown preview accepted for Mintlify compatibility. It changes only the visible preview. Copy and open-in actions still use the human-visible content between the tags.
string | ReactElementdefault: sparklesHeader icon. Accepts a Font Awesome name, image URL or path, or inline SVG element.
regular | solid | light | thin | sharp-solid | duotone | brandsFont Awesome style applied to an unprefixed string icon. It does not alter image URLs, paths, already-prefixed names, or inline SVG elements.
('copy' | 'cursor' | 'claude' | 'chatgpt' | 'perplexity' | 'gemini' | CustomAction)[]default: []Open-in actions in display order. CustomAction is { label: string; url: string; icon?: string }. Copy is always shown. An explicit copy entry is accepted and de-duplicated. Invalid, duplicate, or oversized open-in actions are omitted.
boolean | stringdefault: falseClips the visible preview to one line when set to boolean true or the string "true". The string "false" leaves it off. Every action still uses the full prompt.
boolean | stringdefault: falseHides the visible preview when a title is present and the value is boolean true or the string "true". Without a title, the preview stays visible. The string "false" leaves it off.
stringAdditional CSS class names applied to the Prompt card's root element.
