TransitionsPremium

Circle Reveal

A colored disc opens from the center of the screen until it covers it, the page changes underneath, then it closes on the new one: a cartoon iris in clip-path: circle(), 1.2 s, a layer that covers then uncovers — CSS + 1.5 KB of JavaScript.

CSSClip-pathCircle

Updated

This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Transitions has 52 effects, including 9 free. Explore the category →

3 usage examples

End of episode to next episode — a cartoon platform for kids — Circle Reveal example 1

① End of episode to next episode — a cartoon platform for kids

WhenAutoplay kicks in: the last frame of episode 5 gives way to the title card of episode 6.
WhyThe iris closing then opening again is the classic cartoon code: the child understands "that's the end, here's the next one" without being able to read.
Settings512 × 252 px screen, 14 px corners; original magenta-orange disc; landscape and fox drawn in CSS on page A, striped lighthouse on page B; big round "Next episode" button.
Water meter photo to reading — a water utility's app — Circle Reveal example 2

② Water meter photo to reading — a water utility's app

WhenThe customer aims at the meter and shoots: the camera viewfinder gives way to the photo taken, with the reading (1,284 m³) to confirm.
WhyThe disc opening then closing recalls a shutter: the customer understands the photo is taken, then discovers the reading.
Settings200 × 228 px phone screen; disc recolored as shutter black (#0b0d10); round white shutter button under the screen, like in a camera app.
Next planet — a planetarium's interactive kiosk — Circle Reveal example 3

③ Next planet — a planetarium's interactive kiosk

WhenThe visitor taps "Jupiter": the Mars sheet gives way to Jupiter and its moons.
WhyThe circle evokes a telescope eyepiece switching targets; the transition stays centered, where the planet is shown.
Settings380 × 332 px screen on a sky background; night-blue disc (#4c3fb1 to #1b77cb); planets as CSS gradients, planet menu on the right.

How it works

Above pages A and B sits the .circle-reveal-overlay layer: a magenta to orange gradient (#d946ef → #f97316) cut by clip-path: circle(0 at 50% 50%), so invisible at rest. It fills the whole .transition-preview screen (z-index: 10), but a zero-radius circle shows none of it.

On click, the layer gets .animating and plays @keyframes circleReveal over 1.2 s ease-in-out: the radius goes from 0 to 150% at 45%, stays open until 55%, then back to 0. A percentage radius is computed on the box diagonal divided by √2; at 150%, the circle reaches past all four corners whatever the screen's shape. At 0.6 s, when the disc covers everything, the script toggles .is-b on .transition-preview: page B replaces A underneath, and the disc closes on it. So it is not the new page appearing inside the circle, it is a layer that covers then uncovers: the eye follows the color disc, not a blend of both pages.

B stays on screen once the iris has passed: .is-b is only removed on the next click, which opens the disc again and brings A back. At swap time, the radius read is indeed circle(150% at 50% 50%) in all three test engines (Chromium 151, Firefox 153, WebKit 26.5): no corner of the old page shows.

Accessibility

  • Reduced motion: with prefers-reduced-motion: reduce, the disc stays closed; the script goes straight to B, with a 150 ms fade between the two pages (measured: layer still, B shown in under 250 ms).
  • Keyboard and screen readers: as with Fade Through (fx-0685), the button keeps focus during the iris and the hidden page stays out of the accessibility tree; aria-live="polite" on .transition-preview has B read at swap time if needed.
  • Color: the full disc fills the screen for 0.12 s. On a dark interface, a saturated gradient that large can dazzle: a more muted tint (see Customize) keeps the effect.

Browser compatibility

CSS (@keyframes on clip-path: circle(), inset) + 1.5 KB of JavaScript, no dependency. Measured in Chromium 151, Firefox 153 and WebKit 26.5: disc at 150% at swap time, page B held, back to A on the next click, focus kept, direct swap under reduced motion. Unprefixed clip-path animation exists since Chrome 55, Firefox 54 and Safari 12.1; inset raises the minimums to Chrome 87, Firefox 66, Safari 14.1.

Chrome 87+✓ Full
Firefox 66+✓ Full
Safari 14.1+✓ Full
Edge 87+✓ Full
Mobile iOS 14.5+✓ Full (on tap)
Android Chrome 87+✓ Full (on tap)

Without JavaScript, page A stays on screen and the button does nothing: provide a regular link to the next page. Without inset (Safari before 14.1), write top: 0; right: 0; bottom: 0; left: 0 on .transition-content and .transition-overlay.

The code

HTML structure to paste into your page (the CSS + JS come with your purchase):

index.html — structure
<div class="cr-stage">
  <div class="transition-preview">
    <div class="transition-content old-content">Page A</div>
    <div class="transition-content new-content">Page B</div>
    <div class="transition-overlay circle-reveal-overlay"></div>
  </div>
  <button type="button" class="trigger-btn">Trigger Transition</button>
</div>

One-time payment, no subscription — the code is yours forever

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
Disc color (CSS — .circle-reveal-overlay { background }) #d946ef → #f97316 gradient Black for a shutter, a brand color for a signature. A tint darker than both pages makes the change easier on the eye.
Iris center (CSS — at 50% 50%, to change in the three steps and the resting rule) center of the screen at 100% 0% starts from the top right corner (often where a button sits); then raise the maximum radius to 250% to cover the opposite corner.
Duration (CSS — animation: … 1.2s; JS — SWAP_AT, END_AT) 1.2 s; swap at 600 ms, end at 1,200 ms Change all three together, SWAP_AT at half. 0.8 s for a brisk gesture, 1.6 s for an opening title.
Pause with the disc open (CSS — 45% and 55% steps) 0.12 s 35% / 65% keeps the full disc for 0.36 s, long enough to show a centered logo.
Content (HTML — .old-content, .new-content) "Page A" and "Page B" on two gradients Any HTML. For more than two pages, fill the hidden layer before the click.

FAQ

Portal Open shows the new content through a growing circular mask: you see the new page directly inside the circle. Circle Reveal lays a colored disc over the old page, swaps underneath, then removes the disc: the user never sees both pages at once, only the disc's color between them. Portal Open for a reveal; Circle Reveal for a clean cut between two screens, cartoon style.
In circle(), a percentage radius refers to the box diagonal divided by √2, not to its width. Centered, the circle must reach half the diagonal to cover the corners: about 71% of that reference. 150% leaves a comfortable margin, and the disc already covers the whole screen well before 45% of the animation. If you move the center to a corner, you need about 142%, hence the advised 250%.
Listen for the video's ended event and call stage.querySelector('.trigger-btn').click(): the iris closes on the last frame, the swap happens under the disc, and you can start the next episode in .new-content at the same moment.