Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Prompt Stencil

ProNew

Fill inline variables in a reusable prompt and reveal the composed instruction.

Installation

pnpm dlx shadcn@latest add @viewport/prompt-stencil

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
template*string

Placeholders use double braces, such as {{tone}}.

—
variables*Variable[]

Variable keys, accessible labels and allowed values. The first option supplies the initial value.

—
onChange(prompt: string) => void

Receives the fully interpolated prompt after an edit.

—

Accessibility

  • Each variable has a labeled native select. Resolved prompts are selectable text.