Ghost text completion

Pro

A textarea that finishes your sentence: grey ghost text flows inline after the caret from a mirror layer, Tab takes it all, Ctrl+Right takes one word, Escape dismisses it and matching keystrokes eat into it.

A recording of the component itself. With Pro you get its full source and it runs in your app.

What you get

  • A mirror layer wraps the ghost exactly like real text
  • Async suggest with debounce and cancellation
  • Type-through shortens the ghost without a refetch
  • Accept, word and dismiss keys in a translatable hint bar
  • One TypeScript file in your project, yours to edit. No runtime package.
  • Keyboard, screen reader and reduced motion support; light and dark; your shadcn theme.

Install

npx shadcn@latest add @goodui-pro/ghost-text

Needs a Pro license key in your registry config: two-minute setup. The file lands in components/goodui/ghost-text.tsx.

More Pro components

Node editor

A node graph editor for agent flows: drag nodes and bezier wires follow, pull a wire between typed ports, then run it and watch nodes light up while pulses travel the wires. Pan, zoom, box select, minimap.

Pro

Image generation loader

An AI image placeholder: grain resolves blur to sharp in steps while a scan line sweeps detail down the frame, then a final pass reveals the real image under a prompt caption.

Pro

Tool approval card

An agent tool-call card awaiting approval: arguments show as a JSON diff against the previous call, can be edited with live validation, and states animate through approve, running with a timer, done or denied.

Pro