Text Animations

Flipdot

A mechanical flip-dot sign. Each word is drawn on a grid of small discs. To show the next word, the discs turn over in a sweep: by column, on a diagonal, out from the center, or at random. A disc squashes as it turns and swings a little past flat before it settles. Hover to flip the discs under the pointer, or click to send a wave across the sign.

Install

# Flipdot needs no npm packages

Then copy 2 files into your project:

  • components/registry/flipdot/flipdot.tsx
  • hooks/use-animation-loop.ts

Props

PropTypeDefaultDescription
rowsnumber14Rows of dots on the sign. The columns fill the width.
cascade"columns" | "diagonal" | "radial" | "random""diagonal"The order the discs turn in when the word changes.
staggernumber20Delay between one step of the cascade and the next.
flipDurationnumber140Time one disc takes to turn over.
overshootnumber0.4How far a disc swings past flat before it settles.
holdnumber2.2How long each word stays up after it lands.
ripplebooleantrueThe pointer flips the discs it passes over, and a click sends a wave across the sign.
onColorstring (hex)"#e9d5ff"The bright face of a disc.
offColorstring (hex)"#1d1824"The dark face of a disc.
boardColorstring (hex)"#0c0a10"The sign behind the discs.

What It Demonstrates

3D tilt / Flip
Rotate in 3D space (rotateX / rotateY) to add depth.
Stagger
Animate several items one after another with a small delay between each, creating a cascade.
Ripple
A circle expanding from the point of a tap, confirming the press.
Hover effect
Visual change when the cursor moves over an element.
Loop
An animation that repeats, a set number of times or infinitely.

Related Components

Appears In