Back to Components
Inputs

Rich Text Editor

Lightweight rich text editor with basic formatting controls.

Formatting toolbar supports bold, italic, underline, and bullet list.

Dependencies

  • clsx
  • tailwind-merge
  • lucide-react

Files

  • components/ui/rich-text-editor.tsx

Installation

Using shadcn CLI

npx shadcn add rich-text-editor --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge lucide-react