Ghost Text
A text box that suggests how your sentence goes on, learned from your own writing. The suggestion is solid where it's confident and faint where it's guessing.
Needs: Some of the person's own writing to learn from (sent messages, notes). No model download; the chain trains in the page in milliseconds.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| corpus | string | required | Writing to learn from. Read once, when it mounts. |
| placeholder | string | "Start typing" | Shown in the empty box. |
| size | number | 18 | Text size, px. |
| accent | string | "#2f6fed" | Caret and focus ring colour. The default lightens in dark mode. |
| learn | boolean | true | Keep learning from what's typed here, a sentence at a time. |
| defaultValue | string | "" | What's written to begin with. |
| onChange | (value: string) => void | – | Called with the text whenever it changes, including when a suggestion is taken. |
| className | string | – | Class on the wrapper. |
| style | CSSProperties | – | Style on the wrapper, e.g. --mlui-radius. |