block by herrstucki 27dc76b6f8411b4725bb

Interpolate anything with React Motion

Full Screen

React Motion‘s interpolated styles are just arbitrary values and don’t have to map to actual CSS styles.

In this example, only a single value t is interpolated by React Motion from 0 to 1 when the mouse is pressed, and passed to an color interpolator created with d3-interpolate. Additionally, it’s used to scale the text and to display a percentage.

index.html