Skip to the content

Exploded view

The plate from a parts manual, played by the wheel.

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

    Three things belong to the page rather than to the component: the box marked data-exploded-view takes no height of its own, its height being one screen plus the scroll the view takes; no parent of that box may cut its overflow with overflow: hidden, which stops the block from pinning, so use overflow-x: clip where a parent has to cut; and the box that holds the parts takes no overflow, filter or opacity, which would put its parts back on one plane.
  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-exploded-view Marks the box the page scrolls through while the object comes apart, a section or a block inside one; several can follow one another on a page. It takes no value: leave the value field empty. That box is what the stylesheet makes taller by the scroll the view takes, and what carries the settings. Without it on any element of the page, the embed marks the block holding the screen.
    data-exploded-view-pin Marks the block that stays on screen, a child of the box: the labels and the leaders are placed in it. It takes no value. Without it the engine takes the first block of the box. [ Optional ]
    data-exploded-view-stage Marks the room the object comes apart in: the open view is scaled to fit it, and it carries the perspective. It takes no value. Without it the engine takes the parent of the object. [ Optional ]
    data-exploded-view-object Marks the box that holds the parts, and nothing else: it is what turns and what the parts are stacked in. Its class gives it the proportions of the frame the layers were exported at, 1400 by 692 in the preview: set the aspect ratio of that class to your own frame's (in Webflow: Size, Ratio). It takes no value. Without it the engine takes the parent of the first part. [ Optional ]
    data-exploded-view-part Marks one part of the object. The parts are your own layers, in the order they stack, the first at the back. Each one is a picture on a transparent ground (export every layer of your Figma frame as a PNG, at the size of the whole frame) or any block of the page. Give each part one label, in the same order. Add or remove parts and labels: the view adapts to however many there are. Swap a picture, delete a part with its label or add one of each: the leaders, the numbers and the sides of the labels follow. A picture of another shape than the frame is set whole inside it. In Webflow, the parts being stacked, a click on the canvas always takes the one on top: pick a part in the Navigator, where they are the blocks named Part 1, back, to Part 6, front, inside the box named Object, and replace its image in the Settings panel. Export every layer at the size of the same frame. It takes no value. Two parts are the least. [ Required ]
    data-exploded-view-anchor="0.32 0.27" On a part, only to place by hand the point its leader starts from: two shares of the part's box, across then down, 0 0 its top left corner and 1 1 its bottom right. Without it the engine finds the point itself, on the part and near the end that faces its label: from the opaque pixels of a picture, from the box of what a block holds, from the lower corner of a block that holds nothing. [ Optional ]
    data-exploded-view-label Marks the label of a part, in the Navigator a block of the box named Labels, named Label 1 for Part 1: the first label names the first part, the back one, the second the second. With a number, data-exploded-view-label="3", it names that part instead. A part with no label moves and is never named. [ Optional ]
    data-exploded-view-labels Marks the box that holds the labels, so that it steps aside when the labels are set beside the object. It takes no value. [ Optional ]
    data-exploded-view-number Inside a label: marks the block of its number. The engine writes the rank of the label in the list there, 01 for the first, over digits or over nothing, so the numbers follow a label added or removed; a text of your own that is not digits stays as typed. It takes the accent colour while its part is the one being named. It takes no value. [ Optional ]
    data-exploded-view-track Marks a rule the scroll fills: it is scaled across by the place in the scroll. It takes no value. [ Optional ]
    data-exploded-view-state Written by the engine on the box: closed, moving, open, or still under reduced motion. Never written by hand; it is what the stylesheet reads to pin the block. [ Optional ]
    data-exploded-view-layout Written by the engine on the box: sides when the labels sit beside the object, list when they stay in the flow of the page. Never written by hand. [ Optional ]
    data-exploded-view-label-state Written by the engine on each label: on once its part has left its seat, off before. Never written by hand; the stylesheet reads it to bring the label in and out. The engine also writes data-exploded-view-label-side, left or right, and data-exploded-view-current on the label of the part being named. [ 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-exploded-view-line #f4ece0 Colour of the leaders, the rules that tie a label to its part, and of the point each one starts from. Options: any CSS colour.
    data-exploded-view-accent #ffab1a Colour of the part being named: its point on the object, and the number of its label when the label has one marked data-exploded-view-number. Options: any CSS colour.
    data-exploded-view-spread clamp(180px, min(44vh, 60vw), 520px) Distance between the first part and the last once the object is apart, any CSS length. The parts in between share it evenly.
    data-exploded-view-axis y Direction the parts leave in: x, y or z. Options: y stacks them up the screen, the last part of the markup at the top; x lays them across, the last on the right; z brings them towards the eye, which needs tiltX or tiltY to be seen. A minus sign turns it round: -y, -x, -z.
    data-exploded-view-depth 0.5 Share of the spread that also comes towards the eye, for x and y: the front parts come nearer and the back ones go further.
    data-exploded-view-tilt-x 5 Lean of the whole once it is apart, in degrees, around the horizontal: the top goes back.
    data-exploded-view-tilt-y -14 Turn of the whole once it is apart, in degrees, around the vertical.
    data-exploded-view-perspective clamp(900px, 110vw, 1800px) Distance of the eye from the stage, any CSS length.
    data-exploded-view-stagger 0.55 How much one part waits for the other, from 0 to 1.
    data-exploded-view-first front End of the stack that leaves first: front or back. Options: front starts with the last part of the markup, the one in front, then the first, then inwards from both ends; back starts with the first.
    data-exploded-view-length clamp(1500px, 360vh, 4400px) Scroll the view takes, any CSS length: how long the block holds the screen.
    data-exploded-view-hold 0.3 Share of the scroll the object spends fully apart, every label in place, from 0 to 0.9.
    data-exploded-view-reassemble on Whether the object closes again before the section ends: on or off. Options: on plays the move back in the last part of the scroll, so the page goes on with the object whole; off leaves the section with the object apart and its labels in place.
    data-exploded-view-smooth 0.18 Time the parts take to catch the scroll, in seconds.
    data-exploded-view-side auto Where the labels go: auto, alternate, left, right or list. Options: auto sets each label on the side its part sits on, and shares out the parts that sit in the middle so the two sides stay even; alternate goes left, right, left in the order the parts leave; left and right keep one side; list never sets them beside the object. Whatever is asked, the labels stay a list when the stage is too narrow for them.
    data-exploded-view-reach clamp(20px, 3.4vw, 64px) Distance between the open object and the near edge of a label, any CSS length.
    data-exploded-view-pointer 5 Most the mouse tilts the whole, in degrees, at the edge of the screen.
    data-exploded-view-fit on Whether the open view is scaled down to stay inside its stage: on or off. Options: on measures the object fully apart and scales it, only ever down, to the room the stage and the labels leave; off keeps the size of the CSS, and a spread too large runs out of the stage.

What it does

Exploded view is a scroll animation for Webflow and vanilla JavaScript, with no library. Also called exploded view on scroll, exploded product animation or product teardown animation.

The plate from a parts manual, played by the wheel. A section holds the screen while the page scrolls through it, and the object in its middle comes apart: its parts leave their seat one after the other, from the outside in, along one axis and in perspective, the whole turning a little so the depth reads. Each part is named as it arrives, by a label set at its own height and tied to it by one rule that draws itself from the part to the words; then the object closes again by the same move played back, before the page moves on. The parts are the page's own elements, pictures with a transparent ground or anything else, stacked in one cell in the order a page stacks them. The labels are the page's own blocks: beside the object, on the side each part is nearest to and pushed off one another, when the screen has the room; a list under the object, the part being named lit, when it has not. The open view is scaled to the room it has, so nothing ever runs under a label or out of the screen. The move is eased towards the scroll, and a mouse tilts the whole a little. CSS 3D transforms and one SVG for the leaders, no WebGL and no library: the hold is sticky positioning, the position is read from the layout, so it follows the browser's own scroll and a smooth scroll library alike. Under reduced motion, and without the script, the object is whole and its parts are a list. Pattern type exploded view, product teardown, layered product reveal.

Updated

Questions

Mark a section data-exploded-view, the block that stays on screen data-exploded-view-pin, and inside it a stage, data-exploded-view-stage, holding one box marked data-exploded-view-object. Each child of that box marked data-exploded-view-part is a layer, the first at the back, and each block marked data-exploded-view-label names the part of the same rank. data-exploded-view-length is the scroll the view takes.

No library at all, and no WebGL. The hold is CSS sticky positioning, the place in the scroll is read from the layout, the parts move by CSS 3D transforms and the leaders are one SVG. It follows the browser's own scroll and a smooth scroll library alike, and Webflow.destroy() has nothing to take away.

Export every layer of the object at the size of the whole frame, on a transparent ground, from one fixed point of view: the parts share one cell and register on their own. Transparent WebP keeps them light, 86 KB for the six parts of the preview. A part can also be any block of the page, with no picture at all, and adding or removing a part and its label needs nothing else: the labels are numbered and placed again.

Yes. data-exploded-view-axis takes y, the default, x or z, with a minus sign to turn it round, and data-exploded-view-spread is the distance between the first part and the last. data-exploded-view-tilt-x and data-exploded-view-tilt-y turn the open view so the depth reads, data-exploded-view-stagger, 0.55 by default, sets how much one part waits for the other, and data-exploded-view-reassemble="off" leaves the object apart at the end.

A finger drives it as a wheel does, since the view follows the page scroll. When the stage is too narrow to set the labels beside the object, they stay a list under it and the part being named lights up; the open view is scaled down to the room it has. Under reduced motion and without the script nothing is pinned: the object is whole and its parts are a list, all readable.