Diffusion Text
Text that resolves the way a diffusion model writes it: every position starts as noise and settles, the surest first. Uncertain letters keep flickering until their turn.
Needs: Nothing. Per-character confidences from a diffusion model are optional.
Customize
trigger
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | required | The text to write. |
| steps | number | 16 | Denoising steps. Each commits an even share of the positions, the most confident first. |
| duration | number | 1800 | ms from all noise to the last position committed. |
| charset | string | "abcdefghijklmnopqrstuvwxyz" | Glyphs a masked position guesses among. Digits always guess digits, and case follows the real letter. |
| noiseColor | string | "#8a8780" | Colour of the guesses. Left unset, the theme's muted grey (--mlui-muted). |
| trigger | "mount" | "hover" | "inView" | "mount" | When to write: once on mount, once on scrolling into view, or shown plainly and rewritten on hover. |
| confidences | number[] | – | Your model's confidence per character of text, 0 to 1. Any left out are simulated. |
| size | number | string | 56 | Font size in px, or any CSS length. |
| color | string | "" | Ink colour. Left unset, the theme's foreground (--mlui-fg). |
| seed | number | 1 | Seed for the simulated confidences and guesses. |
| className | string | – | Class on the root. |
| style | CSSProperties | – | Inline style on the root, e.g. a font weight. |