@dioramajs/text/rotator
Exports of @dioramajs/text/rotator.
On this page
import { default, fall, overshoot } from '@dioramajs/text/rotator'Functions
fall | A flap falling: faster and faster, then one small bounce on landing. |
overshoot | Speeds up like cubicInOut, then runs a few percent past the end and settles back. |
pieces | Where the pieces of radius turn are at `progress` (0 the word leaving, flat; 1 the word coming, flat), back to front. `height` is the element's box height. Under reduced motion the words fade. |
Constants
default | Words take turns in a phrase on the faces of a real 3D shape: a cube or a drum that rolls to the next word, a split flap falling over its hinge or a strip folding into the page, lit from above and seen in perspective. The box eases to the width of the next word; between turns the word is plain DOM text. |