Dither Rotator
For a line like "We help you design / build / ship". Each change is a dither: the next word appears cell by cell exactly where the last one disappears, through a pair of complementary blue-noise masks, so for a moment the two are woven together. It keeps the width of its longest word, so the sentence round it never jumps; it holds still under the pointer and for reduced motion, and screen readers hear the whole list once rather than every change.
Needs: None. A CSS mask.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| words | string[] | required | The words it turns through. |
| interval | number | 2.2 | Seconds each word stays. |
| duration | number | 0.5 | Seconds a change takes. |
| tone | string | – | The words' colour. The surrounding text colour by default. |
| cell | number | 2 | Size of one dither cell in px. |
| pauseOnHover | boolean | true | Stop turning under the pointer. |
| className | string | – | Class on the word. |
| style | CSSProperties | – | Style on the word. |