Prompt
Display pre-built AI prompts with a one-click copy button for easy reuse.
For isolated previews, theme switching, and sandbox editing, open the Prompt playground on holydocs.com .
When to use
Use this component when the reader benefits from an active surface such as a form, quiz, chart, or draggable visual.
Live Examples
Every example below renders the real component directly inside HolyDocs, followed by the exact MDX you can paste into a page.
Basic
Simple prompt with copy button.
Explain how the authentication flow works in this project, including how tokens are issued and validated.
mdx<Prompt>Explain how the authentication flow works in this project, including how tokens are issued and validated.</Prompt>
With Title
Prompt with a descriptive title.
Debug API Errors
I'm getting a 403 error when calling the /projects endpoint. Walk me through the authentication middleware and explain what might cause this.
mdx<Prompt title="Debug API Errors">I'm getting a 403 error when calling the /projects endpoint. Walk me through the authentication middleware and explain what might cause this.</Prompt>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | -- | Optional label displayed above the prompt text. |
Usage
Start from this baseline shape and then tailor the copy, data, or nesting to the page you are writing.
mdx<Prompt>Explain how the authentication flow works in this project, including how tokens are issued and validated.</Prompt>
Tips
- Explain what changes when a reader interacts with the component. Motion or controls alone should not carry the full meaning.
- Keep a non-interactive fallback in mind for screenshots, exported docs, and AI-driven readers that only see the resulting HTML.
- Verify keyboard behavior and focus states whenever the component includes inputs, toggles, or draggable controls.
Related Components
More
- Interactive playground: Prompt on holydocs.com
- Component library index: /components