Component packs › Muse › AI Edit Diff

AI Edit Diff

A pen stroke runs through every removed word, then the new words are typed in, underlined, for you to accept or reject.

AI Edit Diff is a diff from Muse, a component pack with 6 AI writing components: AI writing controls that show every change as an edit you can read and trace. Price: $2 for the whole pack.

Built with: word-level diff, strike then type, accept and reject.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

AI Edit Diff props

PropTypeDefaultDescription
originalstringText before the edit.
revisedstringText after the edit.
instructionstring"Make it more specific"What the edit was asked to do. Default "Make it more specific".
onResolve(accepted: boolean, text: string) => void
autoplaynumber | falseShowcase mode: plays the edit and accepts it, every N ms while visible.

Methods on the ref

Use it in React

import EditDiff from './EditDiff';

<EditDiff />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Muse

Good for: AI writing UI.