Skip to the content

Split-flap

Text that lands like a railway departures sign.

Become a member to unlock the full effect today.

Join now

Already a member? Sign in

Documentation

  1. Copy to Webflow

    Add Geist and Geist Mono to your site's fonts (Site settings, Fonts, Google Fonts) before pasting: Webflow removes any font your site has not installed.

  2. Add custom CSS

    The tiles are built by the script beside the text, and their size and colours are settings, written on the element: nothing to style by hand. Until the script runs, and on the Designer canvas, the text shows as written. Leave the element and its close parents without overflow: hidden: the flaps swing out of their tiles as they fall.
  3. Add custom JS

  4. Use it on your own elements

    Custom attributes
    Select the element on the canvas and open the Settings panel. Under Custom attributes, add a pair: the name on the left, the value on the right.
    Custom attributeWhat it does
    data-split-flap Marks a heading or a text block whose text lands as a split-flap sign: every character becomes a tile that turns through its flaps to the right one as the element comes into view. It takes no value: leave the value field empty. On a block holding several texts marked data-split-flap-field, it runs them all on one clock.
    data-split-flap-values A list of values, separated by |, on the marked element or on a field: 04471|04472|04480. The element shows each in turn, every interval seconds, and only the characters that change turn. Its own text is the first value. Without it, the text plays once, as it enters the window. [ Optional ]
    data-split-flap-field On a text inside a marked block: each field is a row of tiles of its own, and all the fields of the block turn together and move on together. Without any, the marked element itself is the one row. [ Optional ]
    data-split-flap-state Written by the engine on the marked element: ready while blank tiles wait, playing, done at rest, static under reduced motion. Never written by hand. [ Optional ]
    Settings
    Every setting is a custom attribute too, added the same way and on the same element. An attribute always wins over the defaults written in the code.
    AttributeDefaultWhat it is
    data-split-flap-tile #15100c Colour of a tile's face, any CSS colour. Options: any CSS colour, ink by default.
    data-split-flap-ink #f4ece0 Colour of the glyphs on the tiles, any CSS colour. Options: any CSS colour, cream by default.
    data-split-flap-hinge #f4ece0 Colour of the cut across the middle of each tile, usually the colour behind the tiles. Options: any CSS colour, cream by default.
    data-split-flap-flip 0.075 Time one flap takes to fall, in seconds; a character turns through several.
    data-split-flap-flips 9 Most flaps a character turns through before it lands. A character close behind its target on the drum turns fewer.
    data-split-flap-stagger 0.035 Delay between the start of one character and the next, left to right, in seconds.
    data-split-flap-chars ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:.-/>#& The drum: the characters a tile turns through, in order. A blank always comes first; lowercase is read as uppercase. A character of the text that is not on the drum still lands, after a run of drum flaps. Options: any string, ' ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' for a plain sign.
    data-split-flap-hover false Whether the pointer turns it again. A single text turns through its flaps back to itself; a list moves on to its next value at once. Options: false (it plays as it enters the window, then only its list moves), true.
    data-split-flap-interval 4 Time a value of a list stays up before the next one turns in, in seconds, counted once the last flap has landed. 0 stops the list.
    data-split-flap-offset 0.12 How far over the bottom edge of the window the element has to come before it plays, as a share of the window height, 0 to 0.9.
    data-split-flap-replay false Whether it plays again each time it comes back into view. Options: false (once), true (blank tiles again once it has fully left the window).
    data-split-flap-room 0.2 Width a tile adds to its glyph, in em of the text.
    data-split-flap-height 1.22 Height of a tile, in em of the text.
    data-split-flap-gap 0.06 Space between two tiles, in em of the text.
    data-split-flap-radius 0.06 Rounding of a tile's corners, in em of the text.

What it does

Split-flap is a text animation for Webflow and vanilla JavaScript, with no library. Also called split flap text animation, split flap effect or departure board text effect.

Text that lands like a railway departures sign. As a heading enters the window, every character becomes a tile cut at mid height, and the top half falls over the bottom one, in perspective, until the right character is up. Nothing is scrambled: each tile turns one way through an ordered drum, blank, A to Z, 0 to 9, a few signs, so a letter close behind its target lands first and the row settles in the order a real sign would. The text is the element's own, a Webflow Heading as it is, read once by a screen reader, and the tiles have a fixed width, so the line never moves while they turn. A list of values turns on its own clock, only the characters that change, and the pointer can turn it again. Under reduced motion the text is simply there. Pattern type split-flap display, Solari display, flap text.

Updated

Questions

Paste the component, select your Heading or Text Block, open the Settings panel and add the custom attribute data-split-flap with an empty value. The Designer canvas keeps showing the plain, editable words: the tiles only exist on the published page and in the preview.

No. The split-flap engine has no dependency and no build step. It builds the tiles beside the element's own text and turns them on one shared requestAnimationFrame loop that stops on the frame the last flap lands.

Set data-split-flap-flip, the time one flap takes to fall, 0.075 seconds by default: lower gives a fast, buzzing sign, higher a slow mechanism where each flap is seen. data-split-flap-flips (9 by default) caps how many flaps a character turns through, and data-split-flap-stagger (0.035 by default) is the delay between one character and the next.

Yes. Add data-split-flap-values="04471|04472|04480" to the element and it shows each value in turn, every interval seconds (4 by default), turning only the characters that change. A list is one row as wide as its longest value, so it never wraps and never changes width.

Yes. The original text stays in the element, visually hidden, and is read once, while the tiles are aria-hidden. Under prefers-reduced-motion the text is there from the start on still tiles, and a list of values still moves on without a flap turning.