Ghost Complete
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initFieldGhost(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/input-ghostAbout this component
An email field that finishes the domain for you. Type the @ and the rest of a likely address appears in grey after your caret with a Tab key hint; Tab (or the right arrow, or tapping the hint) washes the ghost text solid and it becomes part of what you typed.
Triggers
- Focus
- State change
- Icon
Techniques
- CSS transition
- State machine
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
The input is labelled "Email". Tab only accepts while a suggestion is showing, otherwise it moves focus as usual. A polite live region announces each new suggestion once ("Suggestion: gmail.com. Press Tab to accept.") and the completed address. The ghost and key hint are aria-hidden.
Use it in anything you build, commercial and client work included. Licence