Component packs › Muse › Ghost-text Suggest

Ghost-text Suggest

A suggestion is written in after your caret; Tab takes it and underlines what was added, Esc strikes it out.

Ghost-text Suggest is an autocomplete from Muse, a component pack with 6 AI writing components: AI writing controls that show every change as an edit you can read and trace. Price: $2 for the whole pack.

Built with: mirror layer textarea, written-in ghost, pluggable suggest().

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Ghost-text Suggest props

PropTypeDefaultDescription
valuestringStarting text.
suggest(text: string) => string | Promise<string>a short built-in listReturns a continuation for the text (or a promise of one). Default: a short built-in list.
labelstring"Reply to Dana"Field label. Default "Reply to Dana".
placeholderstring
delaynumber600Pause before suggesting, in ms. Default 600.
onAccept(added: string, text: string) => void
autoplaynumber | falseShowcase mode: types, gets a suggestion and accepts it, every N ms while visible.

Methods on the ref

Use it in React

import GhostSuggest from './GhostSuggest';

<GhostSuggest />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Muse

Good for: AI writing UI.