Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

React AI Prompt with History Block

React AI prompt with history block for Next.js with recent prompts dropdown, timestamps, and reuse functionality using shadcn/ui and Tailwind CSS

Never lose a great prompt again with built-in history tracking. This React block features a textarea with an integrated dropdown showing the last 8 recent prompts, each with truncated text and relative timestamps. Built with TypeScript, shadcn/ui DropdownMenu, ScrollArea, Button, and Textarea components, and Tailwind CSS, clicking any history item instantly fills the input for reuse or modification. A clear history button keeps things tidy. Integrates with AI SDK useChat persistence in any Next.js project.

React AI Prompt with History Block preview

Loading...
Scroll to load preview

Installation

Install
Pro block

FAQ

Last updated on March 15, 2026

Was this page helpful?

Sign in to leave feedback.