Skip to content
caliper ui pro docs

Prompt playground

Work on a prompt with real inputs: a field for every {{variable}}, model and sampling settings beside it, output with tokens and time, and saved versions you can diff against the editor, settings included.

Pro

Promptv3

Saved by Maya Chen, 9 Oct

30 words · 3 variables

Write {{name}} for a variable. ⌘ Enter runs.

Variables
Settings
0.3

Run the prompt to see what the model writes.

When to use

  • Prompt management and LLM developer tools.
  • Internal tools where teams tune prompts together.

When not to use

  • End users chatting with an assistant; use the chat shell.

Installation

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

Adds its 17 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

templateVariables

0 props

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

fillTemplate

0 props

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

PromptPlayground

6 props
PropTypeDefaultDescription
versions *readonly PromptVersion[]—Newest first. The first one opens in the editor.
models *readonly { value: string; label: string; contextWindow?: number | undefined; }[]—
valuesRecord<string, string>{}Sample values for the template’s variables.
onRun *(request: PromptParams & { prompt: string; template: string; }) => Promise<PromptRun>—A thrown error is shown in the output pane.
onSave((draft: PromptParams & { template: string; note: string; }) => void | Promise<void>)—
classNamestring—

Keyboard

Enter
Activates the focused control.

Accessibility

It exposes status and alert semantics, with aria-labelledby, aria-label, aria-hidden, aria-keyshortcuts, aria-describedby and aria-invalid 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-playground.md

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

More in Assistant screens