Butterflies
Monarchs, cabbage whites and common blues, seen from above, each flying the way they do: never straight, the path bouncing with every wingbeat. Now and then one lands along the top edge of your headline and basks with its wings open, closing them for a while before it lifts off. Hold the pointer still and one comes and settles on it; move quickly, or click, and they take off. The page stays plain and they keep out of your text.
Needs: None. A 2D canvas.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| monarchs | number | 2 | Monarchs: big, orange, black-veined. |
| whites | number | 2 | Cabbage whites: cream with dark wingtips. |
| blues | number | 1 | Common blues: small and quick. |
| cell | number | 3 | Size of one dither cell in px. Bigger cells, bigger butterflies. |
| speed | number | 1 | Time scale. 0 holds the moment. |
| interactive | boolean | true | A hand held still gets landed on; a quick one or a click sends them up. Read on the window. |
| avoid | string | – | CSS selector for the page's text: they keep out of it and like to land along its top edge. |
| seed | number | 6 | Picks where they start and how they wander. |
| opacity | number | 1 | Opacity of the whole scene. |
| dpr | number | null | Device pixel ratio to render at. Math.min(devicePixelRatio, 2) when unset. |
| className | string | – | Class on the root element, which fills its parent. |
| style | CSSProperties | – | Style on the root element. Theme it through the --mlui-* variables. |