OPEN SOURCE Code block — magic move
Shiki · Shiki Magic Move
RSV Available for React, Svelte, Vue #editorial#type

Each digit spins through its neighbours to the new value while the figure reflows.
Rolls only the characters that change, one step, instead of spinning through every digit.
pnpm add fancy-ui-svelte import { TextRoll } from "fancy-ui-svelte"; Counts the value up or down rather than spinning each digit on its own wheel.
pnpm add fancy-ui-svelte import { NumberTicker } from "fancy-ui-svelte"; Pressing Shuffle sends every digit around a vertical wheel: the digits it passes stay faintly visible above and below, so the eye reads motion rather than a swap. Separators and sign fade in and out while the whole figure slides to its new width, so a change of length never jumps.
A headline figure that changes in front of the visitor: a price toggle, a live counter, a total.
Screen readers should hear the final value once, not each frame. Under reduced motion the change should be instant. Proportional digits make the width jitter; use tabular numerals.