Skip to content

SuggestionBar

Stable

A bar under an AI draft. Nothing changes in your document until you choose.

Also known as inline suggestion, accept reject bar

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

Try each button

Draft ready. Nothing is added until you choose.

Our quarterly numbers beat the forecast, driven by steady renewals and two large new accounts.
Uses 1 AI response

Choose what to do.

Try each button. Regenerate and Fine-tune show a short wait. Keep and Discard finish it.

When to use it

Sits under an AI draft that has not been added yet. Nothing changes in the document until the person chooses, and Regenerate and Fine-tune are kept clearly apart.

Made of: Draft preview · Main button · Insert below · Regenerate · Cost of trying again · Discard · Fine-tune box · Spoken update

Use it for

  • A draft paragraph the AI wrote for a document.
  • Replacing selected text with a rewrite, with Replace as the main button.
  • Showing what another try costs when tries count against a limit.

Not for

  • One small edit with a before and after: use SuggestionCard.
  • An action the assistant wants to take that needs a yes: use ApprovalPrompt.
  • A suggested ending to the line being typed: use GhostText.

Do and avoid

Draft ready. Nothing is added until you choose.

Thanks for your order. It ships on Monday and arrives in three days.
Do. The draft waits below until people keep it, change it or discard it.

Draft ready. Nothing is added until you choose.

Thanks for your order. It ships on Monday and arrives in three days.
Avoid. Two things say Regenerate, so people cannot tell a redo from a change.

Do

  • Keep the draft out of the document until the person chooses Keep, Replace or Insert below.
  • Show what another try costs when tries count against a limit.
  • Call the box Fine-tune this and the button Regenerate, so they are not confused.
  • Return the cursor to the document after Keep or Discard.

Avoid

  • Do not add the draft just because time passed or the person clicked away.
  • Do not call a request for a change Regenerate.
  • Do not hide Discard. Closing the bar should never be the only way out.

On a phone

  • The buttons wrap onto new rows, and Discard moves to the right edge of its row.
  • The Fine-tune field is 16px on touch screens, so the page does not zoom when it takes focus, The field grows to 44px tall, and the Send button keeps its size and has a 44px tap area.
  • The long placeholder is cut off in a narrow field. The bar does not move above the on-screen keyboard, so place it where the keyboard will not cover it.

Seen in products

  • Notion offers accept, discard, insert below, or try again. Each Try again counts as another AI response against the free limit.
  • Google Docs offers Replace, Insert (below), or Close, which discards.
  • Word Copilot offers Keep it, Regenerate and Discard, plus a compose box for Fine tune this draft.

Build your next AI screen with Tattva.

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

Get started