Stop Rebuilding UI

Chat Message Highlight

React chat block with text annotation and highlighting for Next.js that lets users select text ranges in messages and add notes, showing highlighted spans with expandable annotation cards using TypeScript, shadcn/ui, and Tailwind CSS

Scroll to load preview

Annotate chat messages like Google Docs comments in your React and Next.js application. This TypeScript block lets users highlight text ranges within messages and attach notes. Highlighted text shows a subtle amber background, and clicking a highlight expands an annotation card showing the selected text, the note, and the annotator name. Built with shadcn/ui Avatar, Button, and Input components and Tailwind CSS. Perfect for team messaging platforms, code review discussions, and collaborative chat archives.

FAQ

Last updated on March 28, 2026

Was this page helpful?

Sign in to leave feedback.