Skip to content
caliper ui pro docs

Prompt library

Saved prompts a team can find and reuse. Search and category chips narrow the list, a star marks the ones you reach for, and opening a prompt asks for each `{{variable}}` beside a live preview of the finished text before copying it.

Pro

Team prompts

8 saved

When to use

  • A team’s shared prompts for support replies, reviews or release notes.
  • Any template with blanks people fill in before pasting elsewhere.

When not to use

  • Editing and versioning a prompt against a model; use `prompt-playground`.
  • Long documents with dozens of fields; build a form.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/prompt-library

Adds its 23 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

PromptLibrary

9 props
PropTypeDefaultDescription
prompts *readonly SavedPrompt[]—
onStarChange((id: string, starred: boolean) => void)—
onCopy((id: string, text: string) => void)—Called after a copy with the prompt id and the filled text.
titlestring"Prompt library"
loadingbooleanfalse
errorstring—Why the library could not load. Shows Retry when `onRetry` is given.
onRetry(() => void)—
emptyActionReactNode—Shown when there are no prompts at all, such as a New prompt button.
classNamestring—

variableLabel

0 props

No props of its own; it accepts the native props of its root element.

Keyboard

  • Keyboard and focus come from Radix dialog: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.

Accessibility

It exposes status, alert, group and region semantics, with aria-label, aria-hidden, aria-pressed, aria-haspopup and aria-live kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/prompt-library.md

The index of every part is at /llms.txt.

More in Assistant screens