Back to blocks
BlockAI & ChatFree

Prompt Library Block React component

A library of reusable AI prompts: categories, search, popular, recent and favorite sorting, cards that highlight {{variables}}, a side panel that builds a form from those variables with a live preview, Copy and Use in chat, and a New prompt form that finds variables as you type.

About the Prompt Library Block component

Prompt Library Block is a shared shelf of prompts that work. Each card shows the category, a short description and the start of the prompt, with fill-in fields like {{audience}} or {{code}} highlighted so you can see at a glance what you need to provide.

Open a prompt and the block builds a small form from its fields. As you type, the preview fills in, then you copy the finished prompt or send it straight to your chat. Star the ones you use most, sort by popular or recent, and add your own with a form that spots fields as you type them.

When to use it

Use it inside an AI product as a template gallery, in an internal tool to share prompts across a team, or on a resource page for your users.

Name fields in plain words, such as {{product}} or {{audience}}; they become the form labels.

Installation

Add the Prompt Library Block component to your project with the shadcn CLI. It lands in components/prompt-library.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/prompt-library

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

More AI & Chat components

AI Chat Bubble Launcher
Free
Model Picker Block
Free
Chat History Sidebar
Free
Agent Task Progress Block
Free
AI Image Generation Grid
Free
AI Search Results Block
Free