Prompt Stencil
ProNewFill 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
| Prop | Type | Default |
|---|---|---|
| template* | stringPlaceholders 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) => voidReceives the fully interpolated prompt after an edit. | — |
Accessibility
- Each variable has a labeled native select. Resolved prompts are selectable text.