Skip to content

SuggestionCard

Stable

One writing suggestion with its type, the before and after, a reason, and Accept and Dismiss buttons.

Also known as writing suggestion, edit suggestion

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Try it

Clarity

Original: in order to be able to Suggested: to

Shorter phrasing says the same thing.

Accept or dismiss to see the result. The card shows one suggestion, like when you click an underlined phrase.

When to use it

Shows one writing suggestion with its type, the original crossed out next to the new text, and a short reason. One card per suggestion keeps each decision small.

Made of: Type label with icon · Original text · Suggested text · Reason · Accept · Dismiss

Use it for

  • A spelling, grammar, clarity or tone fix for a phrase.
  • A suggestion opened from an underlined phrase in the text.

Not for

Do and avoid

Clarity

Original: at this point in time Suggested: now

Shorter and easier to read.

Do. One small change with a reason keeps the choice quick.
Clarity

Original: Thanks for your order. We will send it soon and you will get it in a few days, we hope. Suggested: Thanks for your order. It ships on Monday and should arrive by Thursday. We will email you the tracking link.

Avoid. A whole rewrite in one card is too much to judge at once.

Do

  • Show one suggestion per card.
  • Keep the explanation to a sentence.
  • When you add a type, give it both a label and an icon.
  • After Accept or Dismiss, move the cursor to the next suggestion or back to the text.

Avoid

  • Do not tell types apart by color alone.
  • Do not accept just because someone pointed at it or tabbed to it.
  • Do not use it for a whole draft. Use SuggestionBar.

On a phone

  • The card fills the width up to 384px, so it fills a phone and does not grow on a tablet.
  • Accept and Dismiss keep their size and have a 44px tap area on touch screens.
  • The original and the suggestion wrap as one paragraph.

Seen in products

  • Grammarly underlines spans. Clicking one opens a card with one suggestion plus accept and dismiss.
  • Grammarly underline colors map to categories: red correctness, blue clarity, green engagement and purple tone. It also has dynamic, document-specific categories.
  • Apple Proofread shows edits with explanations the user can accept.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started