Predictive Type

Predictive type is an AI UX pattern that shows ghost text completions ahead of the caret for the user to accept, edit, or dismiss. It accelerates writing while keeping the human in control of each commit.

Share

Interactive demo

Mitochondria is the powerhouse of the cell
TAB to complete

Overview

The design problem

How might we design predictive type so people can trust and act on AI output?

Use this pattern

When this pattern fits

  • Perfect for email clients, messaging applications, and text input tools where predictive completions accelerate writing and reduce typing effort.

Avoid this pattern

When to skip or lighten it

  • Secure fields (passwords, secrets) where prediction must never run.
  • Legal or medical drafting that requires every character to be deliberate.
  • Mobile keyboards where ghost text fights system autocomplete.

States

State model coming soon

Key UX elements

Key UX elements coming soon

Anti-patterns to avoid

  • Auto-inserting completions without an explicit accept gesture.

  • Predictions that leak other users’ data into ghost text.

  • No easy dismiss, forcing users to fight the suggestion.

  • Completions that ignore the document’s established style.

How products use it

ProductImplementation
GmailSmart Compose ghost text in email drafts.
GitHub CopilotInline code ghost text accepted with Tab.
NotionAI write-ahead suggestions in docs.
GrammarlyInline completion and rewrite hints while typing.

Implementation

Copy this prompt to generate a production-ready implementation in Cursor, Claude Code, Lovable, or any AI coding agent.

Generate a production-ready implementation of the "Predictive Type" AI interface design pattern.

Pattern Definition:

Frequently asked questions

What is predictive type in AI UX?

Predictive type shows suggested continuation as ghost text; users accept with a key (often Tab) or keep typing to ignore it.

How is it different from smart autocomplete?

Predictive type continues natural prose or code at the caret. Smart autocomplete often ranks commands, mentions, or structured tokens.

What makes accept safe?

Require an explicit accept key, keep undo, and never submit forms on accept. Ghost text should never send messages by itself.

When should predictions pause?

In password fields, when the user is selecting text, and when network or privacy mode disables assistance.

Weekly AI UX in your inbox

Weekly AI interface UX notes and resources on Substack, no spam, unsubscribe anytime.

Subscribe on Substack