Calm motion: animations on this site only fade, with no movement
Prompt library
Saved prompts with a search, tags, and fill-in fields
Keeps the prompts that a person or a team uses often, so they do not type them again.
Basic
Pick a prompt on the left.
promptsis the list. Each prompt has anid, atitle, atext, and optionaltags.- Write a field in the text as
. When a person picks the prompt, each field gets a text box, and the preview fills in as they type. An empty field keeps its. - The search looks in the titles, the texts, and the tags. The tag buttons show one tag at a time.
- "Use this prompt" emits
usewith the filled text and the prompt. Put the text in your prompt input. - On a narrow screen, the detail goes below the list.
- Change the words with
labelsor a label pack. The API table lists the keys.
The promptFields and fillPrompt functions do the work on the fields. They are exported for your own views.
Usage
ts
import { BlessPromptLibrary } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
prompts* | BlessSavedPrompt[] | — | |
labels | Partial<{ search: string; all: string; tags: string; list: string; none: string; preview: string; use: string; pick: string; }> | — |
Events
| Name | Payload | Description |
|---|---|---|
use | [text: string, prompt: BlessSavedPrompt] |