# AI suggestion

AI suggestion: a free component, built on your design tokens, to use when an assistant proposes an edit a person should accept or reject. A suggested rewrite of one sentence inside a text field, shown as a diff with the reason and where it came from, to accept, reject or swap for another.

Prompt: Add the OpenDesigner component ai-suggestion to this project: https://opendesigner.dev/library/r/ai-suggestion.html. Keep its markup and states; map its --ds-* variables to my tokens.

States: suggested, alternative, accepted, rejected, undo, hover, focus.

Accessibility: Removed and added words use del and ins; the buttons are real buttons, the result is announced in a status line with focus moved to Undo, and the alternative count is a polite live region.

File: https://opendesigner.dev/library/r/ai-suggestion.html
