
Logo loader
Transitions, SVG, Text
AI autocomplete in the email editor of Quire, a made-up writing app, the way real editors do it: while the text types itself, after a pause a light grey suggestion appears after the caret, one word at a time out of a slight blur, with a drawn Tab key beside it. Tab turns it into ink with a pale light running across it and the caret jumps to the end; Esc pulls it back from its last word; Cmd or Ctrl with the right arrow takes it one word at a time. It works with the real keyboard too. Minimal style, a single accent.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Ghost text autocomplete" from Animorio · https://animorio.com
License: free on your own sites and your clients’ sites, paid work included.
Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ghost text autocomplete</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.3.0/opsz.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- The email editor of a made-up writing app, Quire, with AI autocomplete like real editors: while the text types
itself, a grey suggestion (ghost text) fades in after the caret word by word, with a small Tab key beside it.
Tab turns the grey into ink with a light running across it and the caret jumps to the end; Esc pulls the
suggestion back; Cmd or Ctrl + right arrow takes it one word at a time. It also works with the real keyboard. -->
<main class="stage">
<article class="editor" data-editor aria-label="Email draft with AI suggestions">
<header class="editor__head">
<div class="app">
<span class="app__mark" aria-hidden="true">
<svg viewBox="0 0 20 20"><path d="M10 3.2 14.6 9 10 16.4 5.4 9Z" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"/><path d="M10 9.4v4.4" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/><circle cx="10" cy="8.4" r="1.15" fill="currentColor"/></svg>
</span>
<span class="app__name">Quire</span>
<span class="app__sep" aria-hidden="true"></span>
<span class="app__doc">New message</span>
</div>
<span class="ai" data-ai>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 2.2c.4 2.7 1.4 3.9 4 4.3-2.6.4-3.6 1.6-4 4.3-.4-2.7-1.4-3.9-4-4.3 2.6-.4 3.6-1.6 4-4.3Z" fill="currentColor"/><path d="M12.6 10.6c.15 1 .55 1.45 1.5 1.6-.95.15-1.35.6-1.5 1.6-.15-1-.55-1.45-1.5-1.6.95-.15 1.35-.6 1.5-1.6Z" fill="currentColor"/></svg>
<span>Suggestions on</span>
</span>
</header>
<div class="fields">
<p class="field"><span class="field__k">To</span><span class="field__v">Mara Lindqvist</span></p>
<p class="field"><span class="field__k">Subject</span><span class="field__v">Cover drafts</span></p>
</div>
<div class="body" data-body tabindex="0" role="textbox" aria-multiline="true" aria-label="Message body. Tab accepts the suggestion, Escape dismisses it, Control or Command with the right arrow accepts one word.">
<p class="text" data-text><span data-done></span><span class="caret" data-caret aria-hidden="true"></span><span class="ghost" data-ghost aria-hidden="true"></span></p>
</div>
<footer class="editor__foot">
<p class="status" aria-live="polite"><span class="status__roll" data-status>Draft</span></p>
<div class="keys" aria-hidden="true">
<span class="key-hint" data-hint="tab"><kbd class="cap"><span>Tab</span></kbd><span class="key-hint__l">Accept</span></span>
<span class="key-hint" data-hint="esc"><kbd class="cap"><span>Esc</span></kbd><span class="key-hint__l">Dismiss</span></span>
<span class="key-hint key-hint--word" data-hint="word"><kbd class="cap cap--wide"><span>Cmd</span><svg viewBox="0 0 12 12"><path d="M2.5 6h7M6.8 3.2 9.6 6 6.8 8.8" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg></kbd><span class="key-hint__l">Word</span></span>
</div>
</footer>
</article>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.
30 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:
Take “Ghost text autocomplete” from Animorio and fit it into my siteThe paragraph holds three parts in a row: the written text, the caret and the suggestion. The suggestion’s words are inline-block spans (so they can move and blur) with their leading space kept as text, because a space inside an inline-block at the start of a line would vanish.
Each letter is added to the last text node and waits with gsap.delayedCall, longer after a comma or a full stop: the rhythm feels like a hand. The caret stays solid while typing and breathes slowly while it waits.
After THINK seconds the words come in with a stagger from opacity 0, 3 pixels to the left and BLUR pixels of blur; the Tab key arrives last with a back.out.
The words move from the suggestion into the text, change colour from --ghost to --ink one after another, and a pale bar under each one stretches from the left (--s) and then fades (--o). The caret does a FLIP: it is measured before and after the move and animated from the difference back to zero.
Esc sends the words out from the last to the first, blurring them, and removes them. Cmd or Ctrl with the right arrow takes only the first word left; when typing resumes, the rest disappears at once.
| Name | File | Default | What it changes |
|---|---|---|---|
TYPE_SPEED | script.js | 26 | How many letters per second while the email types itself. |
THINK | script.js | 0.55 | The pause before the suggestion appears, in seconds. |
WAIT | script.js | 1.5 | How long a suggestion waits before the demo answers it by itself, in seconds. |
SWEEP | script.js | 0.55 | How long the pale light takes to run across the accepted words, in seconds. |
BLUR | script.js | 4 | How blurred each suggested word is when it starts to appear, in pixels. |
BREATH | script.js | 1.1 | How long one breath of the waiting caret lasts, in seconds. |
HOLD | script.js | 2.6 | How long the finished email stays before it starts again, in seconds. |
--accent | style.css | #2f7a5c | The accent: the caret, the pill, the pressed keys. |
--ghost | style.css | #b5b0a5 | The grey of the ghost text. |
To show an AI writing feature on a product page (an editor, an inbox, a notes app), or as the real state of an editor that suggests: Tab explains itself at a glance.
The card is sized on the width and the body on the height too (vh); below 460 pixels the key labels and the pill’s text hide and the drawn keys stay. Phones have no Tab key: the demo answers by itself.
No typing, no blur and no caret jumps: the email is already written up to the last suggestion, which waits in grey; Tab, Esc and Cmd with the arrow accept it or pull it back with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Newsreader (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.1 KB; the libraries: GSAP 28 KB.
Tested on 29 November 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.