Skip to the content

Glyph transition

A page transition in glyphs, between real pages.

Become a member to unlock the full effect today.

Join now

Already a member? Sign in

Version

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 code has to be on every page the transition joins. For no flash on arrival, move it out of the Embed into the site custom code, the CSS and the script both in the head: the next page is then covered from its first paint.
  3. Add custom JS

  4. Tune it

    Custom attributes
    Select the section 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-glyph-transition Marks the element whose links are taken: a section, a menu, or the Body for every link of the page. It takes no value: leave the value field empty. The settings go on the same element. Without it on any element of the page, the embed marks the Body.
    data-glyph-transition-name On a link: the name written in the middle of the cover, in place of the words of the link. Without it the link writes its own words, and a link with no words the last part of its address. [ Optional ]
    data-glyph-transition-skip On a link, or on any block: the links inside are left to the browser, with no transition. It takes no value. [ Optional ]
    data-glyph-transition-state Written by the engine on the marked element: idle at rest, leaving while the glyphs cover the page, covered until the browser changes page, arriving while they drain, frozen for a held picture, still under reduced motion. Never written by hand. [ Optional ]
    data-glyph-transition-cover Written by the engine on the html element of a page reached through the glyphs, for the moment before the canvas is there: the stylesheet paints it as a flat screen of the cover colour. Never written by hand. [ Optional ]
    Settings
    Every setting is a custom attribute too, added the same way and on the same section. An attribute always wins over the defaults written in the code.
    AttributeDefaultWhat it is
    data-glyph-transition-background #15100c Colour of the cover, the solid a cell turns into and the screen the next page starts under. Options: any plain CSS colour, a hex or an rgb(); white for a light cover, with a dark color.
    data-glyph-transition-color #f4ece0 Colour of the glyphs and of the name written in the middle; a turning cell is lifted a little towards it. Options: any plain CSS colour that reads on background.
    data-glyph-transition-accent #ffab1a Colour of the few glyphs that light up as they turn and of the dot before the name. Options: any plain CSS colour; the same value as color for a pass in two colours only.
    data-glyph-transition-glyphs &!1@Y0?#:Z+=E The characters the cells shuffle through, written one after the other with no separator.
    data-glyph-transition-cell clamp(18px, 1.7vw, 24px) Side of one cell of the grid, any CSS unit; the glyph is 0.62 times that.
    data-glyph-transition-cover 0.66 Time the glyphs take to cover the page, from the click to the last cell, in seconds.
    data-glyph-transition-hold 0.3 Time the page stays covered before the browser is sent on, in seconds; the name finishes writing during it.
    data-glyph-transition-reveal 0.86 Time the glyphs take to drain away on the page reached, in seconds.
    data-glyph-transition-turn 0.3 Time one cell takes to turn, solid and glyph, in seconds.
    data-glyph-transition-grain 0.28 Share of chance in the order of the cells, 0 to 1; the rest is the distance to the pointer.
    data-glyph-transition-hot 0.06 Share of the cells whose glyph is lit in the accent while it turns, 0 to 1.
    data-glyph-transition-keep 0.14 Share of the cells that keep a dim glyph once the page is covered, 0 to 1, flickering until the page changes.
    data-glyph-transition-label true Whether the name of the page being reached is written in the middle. Options: true writes it; false leaves the cover bare.
    data-glyph-transition-label-size clamp(11px, 0.9vw, 13px) Size of the name, any CSS unit.
    data-glyph-transition-links a[href] CSS selector of the links the transition takes, among those inside the marked element. Options: a[href] takes every link; a narrower selector, nav a for one, takes only those.

What it does

Glyph transition is a page transition for Webflow and vanilla JavaScript, with no library. Also called ASCII page transition, glyph page transition or character grid page transition.

A page transition in glyphs, between real pages. A click on a link to another page of the site covers the window with a grid of square cells spreading from the pointer: each cell turns solid while a mono glyph flickers in it, a few of them lit in the accent, and the front is broken by a grain fixed per cell so it never reads as a clean circle. Once the middle of the screen is covered, the name of the page being reached writes itself there, character by character through shuffled glyphs, after a dot in the accent. The browser then goes to the next page for real, and on arrival the same grid drains away from where the hand was, the name fading as the page comes back. There is no router and no library: the pass between the two pages, where the pointer was, the name and the colour of the cover, is kept in sessionStorage for the time of the navigation, and a page reached through the glyphs is covered from its first paint. It works wherever links lead to real pages, a Webflow site for one. Links to another site, to a new tab, to a file or to an anchor of the page are left to the browser. Under reduced motion nothing is taken: the links navigate as they always did.

Updated

Questions

Paste the component on each page the transition joins, or move its code to the site custom code with the <style> and the scripts in the head, because an Embed only runs on the page it is pasted on. Then put the custom attribute data-glyph-transition on the Body, or on a menu for its links only: every link inside it to another page of the same site is taken. Settings are more attributes on that element, for instance data-glyph-transition-cover="0.9".

No. The browser goes to the next page for real, and the pass between the two pages (where the pointer was, the name and the cover colour) is kept in sessionStorage for the time of the navigation. The glyphs are drawn on one canvas, added to the body while a pass is on screen and removed when it is over.

Three settings, in seconds: data-glyph-transition-cover is the time the glyphs take to cover the page (0.66 by default), data-glyph-transition-hold the time the page stays covered (0.3), and data-glyph-transition-reveal the time they drain away on the page reached (0.86). Lower values give a snap, and a high cover makes the site feel slow on every click.

The script runs too late on the page reached. Load the two files in the <head>, the stylesheet first and the script without defer: the script reads the pass as it runs and marks <html>, and the stylesheet paints that mark as a flat screen of the cover colour. With the script at the end of the body the transition still plays, and the flash is the cost.

Yes. The name written is the words of the link in capitals, 28 characters at most, and data-glyph-transition-name="Order desk" on the link gives another one. A link inside an element marked data-glyph-transition-skip is left to the browser, as are links to another site, target="_blank", downloads, files and anchors of the page itself.