axi0motion

Flip board

A split-flap board: every tile clacks through the letters to the next phrase.

  • enhancer
  • loop
  • letters
  • board
  • since 0.2

Background Studio: tune it below, then copy the code

Your system asks for reduced motion: the demo shows its final state and nothing moves.

Live demo

Flip board example

NOW BOARDING

Controls

3400 ms
75 ms
12
24 ms

Code

It follows the controls above: change an option and the code changes with it.

<link rel="stylesheet" href="/axi0/motion/motion.css?v=6">
<script src="/axi0/motion/motion.js?v=10" defer></script>

<p class="demo-big" data-motion="flip-board" data-motion-words="NOW BOARDING|GATE 12 ON TIME|SMALL AND FAST">NOW BOARDING</p>

The wrappers: FlipBoard.tsx (React, TypeScript) and FlipBoard.vue (Vue). Both render the same attributes as the HTML; the loader does the rest.

Options

AttributeDefaultWhat it does
data-motion-wordsautoMore phrases, separated by |
data-motion-interval3400Time on each phrase
data-motion-speed75Time per flip
data-motion-steps12Most flips per change
data-motion-stagger24Delay between tiles
data-motion-tile#17171cTile color
data-motion-ink#f5f5f7Letter color

Accessibility

The board is drawn over the element's own line, which keeps its place (invisible), so nothing reflows; it is as wide as the longest phrase, centered or aligned like the text, so leave room around it. Screen readers hear every phrase once; the tiles are aria-hidden. Text on screen at load starts on its first phrase; reduced motion shows the first phrase still. The loop stops off screen and in hidden tabs.

Size

flip-board.js is 2.0 KB gzip, with text-kit.js 2.6 KB it needs. A page loads the loader (2.7 KB) and core.js (1.4 KB) once, whatever it uses.