Revising Text
For a model that revises as it goes. Each new draft is diffed against the last, so you see the words that changed as they change.
Needs: Nothing. Successive drafts from your model.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| drafts | string[] | required | Successive versions of the text, first draft first. Each is diffed against the one before, word by word. One paragraph. |
| interval | number | 1400 | ms to rest on each version before the next revision arrives. |
| typingSpeed | number | 40 | Characters a second for typing the first draft. |
| showHistory | boolean | true | Mark each changed span with a dot that shows what it said before. |
| accent | string | "#2f6fed" | Colour of the strike, a new word's first moment, the caret and the marks. Left unset, a lighter blue in dark mode. |
| size | number | string | 40 | Font size in px, or any CSS length. |
| color | string | "" | Ink colour. Left unset, the theme's foreground (--mlui-fg). |
| className | string | – | Class on the root. |
| style | CSSProperties | – | Inline style on the root, e.g. a font weight. |