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 includes a Copy action, so 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, while the human-visible authored content between the tags remains the full prompt that Copy and open-in actions use.
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>
The explicit "copy" action is accepted for compatibility, but Copy is always present and never needs to be listed.
Prompt copies the exact human-visible authored content. When a prompt contains Visibility, human-only wrapper tags are omitted from the copied text but their contents remain. Agent-only subtrees are excluded. Visibility with an expression-valued for prop, or whose audience is obscured by a later spread attribute, is also excluded because its audience cannot be determined statically. By contrast, Visibility with no for prop, shorthand for, or an invalid literal audience remains 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 with its brand icon. The first valid open-in action appears beside Copy; additional actions 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 when a prompt is longer; the Expand control opens the complete prompt. Set singleLine to clip the preview to a single line instead. Either way, the complete human-visible prompt is still copied or sent by an open-in action.
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 only hides the preview when title is present. Without a title, Jamdesk keeps the prompt visible so the card is still understandable.
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 described 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; the human-visible authored content remains the prompt that is copied or sent.
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" remains disabled and the complete prompt is still used by every action.
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" remains disabled.
stringAdditional CSS class names applied to the Prompt card's root element.
