ValyroUI Русская версия

Prompt Library

Prompt library with variables. Pro · AI chat and agents › Prompts and models

Saved prompts with search, categories and favourites. Picking one generates a form for its {{variables}}, previews the filled prompt and inserts it into your composer.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add prompt-library
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { PromptLibrary } from 'valyro-ui-pro';

Props

PropTypeDefault
prompts *SavedPrompt[]Saved prompts to browse, search and insert; {{variables}} in a template become fields to fill in.
categoriesstring[]Category filter order. Defaults to the categories of prompts, in order of appearance.
favoritesstring[]Ids of starred prompts.
defaultFavoritesstring[][]Initial favorites when uncontrolled.
onFavoritesChange(ids: string[]) => voidCalled with the new favorites when it changes.
selectedstring | nullId of the open prompt.
defaultSelectedstring | nullnullInitial selected when uncontrolled.
onSelectedChange(id: string | null) => voidCalled with the new selected when it changes.
onInsert *(text: string, prompt: SavedPrompt) => voidCalled with the filled-in prompt text.
labelsPartial<PromptLibraryLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Model Comparison · Next: Chain of Thought · All AI chat and agents