Skip to the content

Clip reveal

The image reveal of a studio site, held to its curve.

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 frame owes itself a size: the picture fills the frame, so give the box a ratio or a height, and the image width: 100%, height: 100% and object-fit: cover. A border-radius on the frame is carried inside the clip while it opens. Before the script runs, a marked frame is hidden with visibility and keeps its room; it shows by itself after four seconds if the script never comes, and at once without JavaScript, through the noscript line the paste carries inside its Embed.
  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-clip-reveal="up" the frame opens from its bottom edge upwards, and this is what an empty value does
    data-clip-reveal="down" it opens from its top edge downwards
    data-clip-reveal="left" it opens from its right edge leftwards, the rule standing upright
    data-clip-reveal="right" it opens from its left edge rightwards
    data-clip-reveal="center" it opens outwards from its middle, and the rule is the outline of the window
    data-clip-reveal-media Marks the element that takes the counter scale inside a frame, a wrapper around the picture for instance. It takes no value. Without it the first img, video, picture, canvas, iframe or svg of the frame is taken; a frame with none still opens, without the scale. [ Optional ]
    data-clip-reveal-state Written by the engine on the frame: ready while it waits closed, playing, done once open, static under reduced motion. Never written by hand. [ Optional ]
    The value is optional: left empty, the frame opens up. The direction is a setting of the table below as well, and the value written here wins over it. The attribute goes on the box that holds the picture, never on the image itself.
    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-clip-reveal-color #ffab1a Colour of the rule that leads the edge, the accent of the page. Options: any CSS colour.
    data-clip-reveal-direction up The way the edge travels. The value written on data-clip-reveal itself wins over this key. Options: up, the frame opens from its bottom edge upwards; down, from the top; left, from the right edge leftwards; right, from the left; center, outwards from the middle, the rule drawn as the outline of the window.
    data-clip-reveal-duration 1.1 Time a frame takes to open, in seconds, on an exponential out curve; the scrubbed opening ignores it.
    data-clip-reveal-scale-from 1.2 Scale the picture starts at inside the frame, coming back to 1 on the same curve as the clip.
    data-clip-reveal-stagger 0.09 Gap between the starts of two frames that come into view together, in seconds, in the order of the page.
    data-clip-reveal-rule-width 1 Thickness of the accent rule, in px.
    data-clip-reveal-offset 0.12 Share of the window height the top of a frame has to clear, from the bottom, before it plays, 0 to 0.9.
    data-clip-reveal-once true Whether a frame opens one time and stays open. Options: true, one opening and the frame is left alone; false, the frame closes once it is fully out of the window and opens again the next time, and a scrubbed frame follows the scroll both ways.
    data-clip-reveal-scrub false Whether the scroll drives the opening instead of the clock. Options: false, the frame plays by itself as it comes into view; true, the opening follows the scroll over six tenths of the window height, linear and lightly smoothed, with no stagger.

What it does

Clip reveal is a scroll animation for Webflow and vanilla JavaScript, with no library. Also called clip path image reveal, image reveal on scroll or image mask reveal.

The image reveal of a studio site, held to its curve. A box that holds a picture or a video opens as it comes into view: its clip slides from one edge on an exponential curve, half open after a tenth of the time and then one long deceleration, while the picture inside settles from a closer crop on the same curve, so the picture seems to stand still and the frame seems to open. A one pixel rule of the accent rides the travelling edge, placed on the device pixel grid so it never blurs, and dies in a fifth of a second once the edge is all but home. The frame's own corner radius is written inside the clip, so a rounded frame opens rounded from its first pixel. Frames that come into view together wait for their pictures, then open one after the other in the order of the page. One setting hands the opening to the scroll instead of the clock. Five ways for the edge to travel: up, down, left, right, or outwards from the centre, where the rule becomes the outline of the window. No library, no canvas, nothing left on the frame at rest.

Updated

Questions

Add the custom attribute data-clip-reveal to the box around the image, not to the image itself, and write the direction as its value: up, down, left, right or center. Everything inside that box is hidden until it opens, so a caption goes next to the box. Other settings are attributes on the same box, for instance data-clip-reveal-duration="1.4".

No. There is no library and no canvas: the frame opens on a clip-path: inset() while the picture inside settles from a closer crop. To tie the opening to the scroll instead of the clock, write data-clip-reveal-scrub="true", and it follows the scroll over six tenths of the window height.

data-clip-reveal-duration is the time a frame takes to open, 1.1 seconds by default. Under 0.7 the opening reads as a snap, and past 1.6 the last third looks stalled, because the exponential curve spends it on a few pixels. data-clip-reveal-stagger, 0.09 by default, is the gap between two frames that come into view together.

Yes. A frame does not open on a blank: it waits for its picture to load, and the frames of its row wait with it, for two and a half seconds at most. A video opens like a picture but is not waited for.

Yes. A clip-path ignores border-radius, so the script reads the radius of the frame and writes it inside the clip while it opens. Once open the clip is gone and overflow: hidden on the frame holds the corners, so a class that sets overflow: visible lets the square corners of the picture pop out at the end.