An agent proposes a change as a comment: why, a word diff of the text it would change, and Apply or Dismiss. Nothing changes until you apply, and the card folds to one line with Undo.
- Agent edits to copy
- Review before it changes
- Suggested rewrites
- Docs and specs
Examples
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- author
CommentAuthor- Who suggests it, usually an agent with its mark.
- note
ReactNode- Why, in a sentence.
- before, after
string- The text now and after the change, shown as a word diff.
- target
string- What it changes: "Onboarding copy".
- status
"open"|"applying"|"applied"|"dismissed"- Default
"open" - Applied and dismissed fold to one line.
- onApply, onDismiss, onUndo
() => void- Undo shows on the folded line.
| Prop | Type | Default | Description |
|---|---|---|---|
| author | CommentAuthor | - | Who suggests it, usually an agent with its mark. |
| note | ReactNode | - | Why, in a sentence. |
| before, after | string | - | The text now and after the change, shown as a word diff. |
| target | string | - | What it changes: "Onboarding copy". |
| status | "open" | "applying" | "applied" | "dismissed" | "open" | Applied and dismissed fold to one line. |
| onApply, onDismiss, onUndo | () => void | - | Undo shows on the folded line. |
Accessibility
- The card is a region named "Claude suggests a change to Onboarding copy".
- The diff reads removed and added words in order; the result line is a status, so screen readers hear "Applied by you".
What it handles
- 01Shows why, then the change as a word diff of the text, so the person reads one sentence instead of two versions.
- 02Changes nothing until Apply; Dismiss and Apply fold the card to one line with Undo.
- 03Keeps Apply busy while your call runs and lets the person back out with Undo after.
States
- First render
- The card sits open; nothing plays
- none
- Apply or Dismiss
- The diff folds away and the result line unfolds
- 180ms ease out
- Applying
- Apply shows its spinner
- button loading
- Reduced motion
- The lines swap at once
- 0ms
| State | What moves | Timing |
|---|---|---|
| First render | The card sits open; nothing plays | none |
| Apply or Dismiss | The diff folds away and the result line unfolds | 180ms ease out |
| Applying | Apply shows its spinner | button loading |
| Reduced motion | The lines swap at once | 0ms |
Works with
When to use
When to use
- An agent proposing an edit to copy, a spec or a doc that a person applies or dismisses.
- Any change that must be read before it lands, shown as a small word diff with a reason.
When not to use
- Reviewing many changes across a document: use Inline Diff.
- Approving an action rather than a text change: use Approval Prompt.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Suggestion Comment to my app and wire it to my own data.
- I need an agent proposing an edit to copy, a spec or a doc that a person applies or dismisses. Set that up with the Knowns UI Suggestion Comment.
- Which Suggestion Comment props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "suggestion-comment" }) and search_docs({ query: "suggestion comment" }). Pro props, full examples and source come back once your license key is in the MCP config.