Skip to content
IndexRequest a UIAboutContact

AI Suggestion Diff

An AI rewrite shown as inline changes you can accept or reject one by one, or all at once.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Clean writing assistant UI showing a paragraph with tracked AI edits inline, deleted phrases in red strikethrough and inserted phrases in green underline, below it a list of three suggested changes each with a small Accept and Reject button, a header with Accept all and Reject all, and a quiet line 2 changes pending, light theme, flat modern style, comfortable spacing. Negative: chat bubbles, robots, gradients, text errors, clutter. Reduced motion: static design.

About this pattern

Definition

When an AI edits your text, show the changes instead of silently replacing it. Removed words are struck through, added words are highlighted, and each change has its own accept and reject controls, so people stay in control of their writing.

Purpose & UX principles

  • Show deletions and insertions inline in the paragraph.
  • Give each change Accept and Reject; add Accept all and Reject all.
  • Show the live result and a count of what is pending.
  • Do not apply anything until the person decides, and make it easy to undo.

Interaction states

  • Three suggested changes, per-change buttons and bulk actions.

Motion specification

  • Text updates instantly.
  • Reduced motion: nothing animates.

Responsive behaviour

  • Do not rely on colour alone: use strikethrough and underline too.
  • Announce the new counts to screen readers.

Code

HTML
<div class="bx"><div class="hd2"><b>AI suggestions</b><span><button class="mini" id="aa" type="button">Accept all</button> <button class="mini" id="ra" type="button">Reject all</button></span></div><p class="tx" id="tx"></p><ul class="ls" id="ls"></ul><p class="out" id="out" role="status"></p></div>

Related patterns

AI Response Actions

↗
AI Response ActionsAI & Conversational

AI Prompt Composer

↗
AI Prompt ComposerAI & Conversational

Agent Steps Timeline

↗
Agent Steps TimelineAI & Conversational