reactjsformsuser-inputautosuggest

There's no React JS autocomplete with "inline suggestion & Preview" in textarea? how to implement it


React JS autocomplete with "inline suggestion & Preview" in textarea

Just like what github copilot do in Vscode

enter image description here

I want to build a simple Language Model based conversation text completion So the multiple choice inline completion like https://www.npmjs.com/package/@webscopeio/react-textarea-autocomplete

didn't really work

what I would like is a plain text-area with a suggestion support

what I want is REAL INLINE just the text with transperent concat to the input just like Co-Pilot I've found react-inline-autocomplete Forked it and update the versioning It's good really good! and ALMOST fit my needs but https://github.com/HRNPH/react-inline-autocomplete

Example here: https://kyuch4n.github.io/react-inline-autocomplete/

It didn't really use 'text-area' but instead 'input' so this would work for form-data but not for long content such as article or something similar

Is there an alternative to this? or how can I Implemented the same behaviour in TextArea?


Solution

  • I just published a React package that does exactly what you need: https://github.com/agdhruv/react-ghost-text. Demo:

    demo

    You can import this component and easily use it in your React app. Hope you like it!