17 rebuilds
skip the tree
system / motion / text17 rebuilds

Text

The Text examples of the Motion library, rebuilt in Composite: the same trigger, in steps, with the system's own parts.

the category

motion/_rebuilds
rebuilds
17
from motion+
15
easing
steps() only

motion / text / rolling text button

after a motion.dev example
hover or focus the button
margin_rebuilds/​text/​rolling-text-button.tsx
Motion
a label rolled by a variant
here
every(), 2 cuts
a cut
60 ms, half a line
leave
rolls back

The label rolls to its copy in two cuts of half a line on hover or focus, and rolls back in two cuts when the pointer or focus leaves.

motion / text / rolling text button: staggered

after a motion+ example
hover or focus the button
margin_rebuilds/​text/​rolling-text-button-stagger.tsx
Motion
a stagger over split letters
here
every(), 2 cuts a letter
lag
one step a letter
a cut
60 ms, half a line

Each letter rolls in two cuts, one step after the letter before it. Every letter is a whole cell: none is between two cuts.

motion / text / scroll word reveal

after a motion.dev example
scroll the box
margin_rebuilds/​text/​text-scroll-word-reveal.tsx
Motion
useScroll, a transform per word
here
scroll(), a word a cut
lit
bone ink on grey
keys
the box takes focus

The scroll of the box lights whole words, one cut each, from grey to bone. No word is half lit.

motion / text / number trend

after a motion+ example
set a trend, then shuffle
margin_rebuilds/​text/​number-trend.tsx
Motion
AnimateNumber, layout
here
rollFrames(), play()
a cut
60 ms, one digit
trend
auto, up, down
original
Number trend

Each digit cuts to its next digit, one a frame, in the way of the trend: up counts up, down counts down, auto follows the change. Tabular figures keep each digit in its cell.

motion / text / scramble text

after a motion+ example
the text settles on load
margin_rebuilds/​text/​scramble-text.tsx
Motion
a timer of random glyphs
here
the Dissolve
length
300 ms, a step is 40 ms
order
random

The Dissolve is the scramble of Composite: the characters settle in random order, a few each step.

motion / text / scramble text: hover

after a motion+ example
hover or focus the line
margin_rebuilds/​text/​scramble-text-hover.tsx
Motion
a timer of random glyphs
here
the Glitch
trigger
hover or focus
gap
at most 3 a second

The Glitch is the hover scramble: block glyphs and two slices for 240 ms, then the text again.

motion / text / scramble text: stagger from center

after a motion+ example
the text settles from its middle
margin_rebuilds/​text/​scramble-text-stagger-center.tsx
Motion
a stagger from the middle
here
play(), 6 frames
a frame
80 ms, two characters
order
the middle first

A Dissolve in the order of the distance from the middle: the two nearest characters settle first, then the next two, a step apart.

motion / text / typewriter: exploding countdown

after a motion+ example
a countdown, typed, then burst
margin_rebuilds/​text/​typewriter-explode.tsx
Motion
a timer, flying letters
here
play(), cells a frame
a frame
80 ms
a burst
3 cuts of 1 cell

A word types, holds, then each letter takes one whole cell a frame, away from the word, for three frames, and is gone. The next word types after it.

motion / text / typewriter: natural typing

after a motion+ example
the note types itself
margin_rebuilds/​text/​typewriter-natural-typing.tsx
Motion
a timer with random holds
here
play(), uneven frames
a hold
60 to 340 ms
pauses
after a space or a stop

One character a frame, but each key holds its own time, longer after a space and a stop. No hold is under 60 ms, and the numbers are fixed, so the run is the same each time.

motion / text / split text

after a motion+ example
the letters cut in, three a step
margin_rebuilds/​text/​split-text.tsx
Motion
splitText, stagger
here
play(), three letters a frame
a frame
80 ms
hidden
keeps its cell
original
Split text

The letters cut in three a step, in reading order. A letter that is not yet in keeps its cell, so the lines never move.

motion / text / reveal text effect

after a motion+ example
point at a row, or move to it with Tab
margin_rebuilds/​text/​text-reveal.tsx
Motion
a mask, on hover
here
play(), 6 cuts a row
a frame
80 ms
trigger
hover or focus

The row under the pointer, or with focus, rolls its label: it is wiped out to the top in three cuts, then wiped in again in three. The mask moves in whole steps, not in a slide.

motion / text / number formatting

after a motion+ example
press currency or compact
margin_rebuilds/​text/​number-formatting.tsx
Motion
AnimateNumber, a format
here
rollFrames(), play()
format
Intl, en-US
a cut
one cut, 60 ms

A new format cuts in one step, as its shape is new: a sign, a comma or a letter has no digit to roll from. Characters change only on whole steps.

motion / text / price switcher

after a motion+ example
pick monthly or yearly
margin_rebuilds/​text/​number-price-switcher.tsx
Motion
AnimateNumber, a switch
here
rollFrames(), play()
plans
monthly, yearly
unit
cuts with the price

The price rolls from one plan to the other, digit by digit, and the unit cuts at once.

motion / text / number counter

after a motion+ example
press minus or plus
margin_rebuilds/​text/​number-counter.tsx
Motion
AnimateNumber
here
rollFrames(), play()
a cut
60 ms, one digit
range
0 to 99

A press of minus or plus rolls the digits one cut a frame, down or up, to the next whole value.

motion / text / engagement stats

after a motion+ example
press a count to add one
margin_rebuilds/​text/​number-engagement-stats.tsx
Motion
AnimateNumber, a pop
here
rollFrames(), play()
on
a solid fill
a press
adds one, or takes it back

A press rolls its count by one and fills the button solid; a second press rolls it back. There is no pop or colour change: the fill is the state.

motion / text / typewriter

after a motion+ example
the line types in
margin_rebuilds/​text/​typewriter.tsx
Motion
a timer, a cursor
here
play(), a character a frame
a frame
80 ms
ends
at the cursor
original
Typewriter

One character a frame, as the Boot log types, and the line ends at the cursor.

motion / text / typewriter: change content

after a motion+ example
the word is typed, deleted, typed again
margin_rebuilds/​text/​typewriter-change-content.tsx
Motion
a timer, a word list
here
play(), a character a frame
a frame
90 ms
a word
typed, held, deleted

Each word types, holds for six frames and is deleted one character a frame; the last word stays at the cursor.