Google Essay 03 · Container Transform & Circle Reveal · 3 min · Container transform & circle reveal lab
Growing one surface into the next: Container transform & origin circle reveals
Mapping Material 3’s four spatial transition patterns alongside trigger-origin clip-path: circle() theme reveals and dynamic color roles.
Container & Circle Reveal Sandbox: Expand card-to-sheet & launch clip-path circles from any corner
Click any card above to watch a Card-to-Sheet Container Transform preserve origin continuity; click any corner trigger below to expand a tonal surface reveal directly from that button’s (x, y) center.
Click any corner trigger to calculate R = hypot(maxDx, maxDy)Three practical takeaways
- Never drop the anchor: Expand the tapped card smoothly into its detail container so the user’s eye keeps its spatial reference.
- Four clear transition roles: Container Transform for shared cards, Shared Axis (X/Y/Z) for sibling steps, Fade Through for unrelated tabs, and Fade for overlays.
- Origin-anchored surface swaps: Expand
clip-path: circle(0 -> R at x y)from the trigger button center to explain global theme or surface changes visually.
Why one generic fade fails spatial storytelling
Using a plain opacity crossfade for everything forces the eye to re-orient after every tap. When a list item vanishes and a modal pops in from nowhere, spatial context breaks.
Material 3 assigns four distinct spatial grammars: Container Transform for persistent cards, Shared Axis (X/Y/Z) for directional flows, Fade Through for unrelated tabs, and origin-anchored Circle Reveals for global theme/surface shifts.
Trigger-origin circle reveal meets Material You dynamic color
Paired with the browser View Transitions API, clip-path: circle(0 at cx cy) -> circle(R at cx cy) lets a web surface switch skins outward from the exact toggle button—just like Android’s signature theme sweep.
Backed by Material You tonal roles (Google Blue #edf2fa, Mint #eaf6ee, Warm Amber #fef7e0), full-canvas palette shifts stay joyful without ever sacrificing text contrast.
Great transitions never make eyes hunt for their place again: the tapped card grows into the stage, the toggle becomes the reveal origin, and every layer lives inside one coherent spatial desk.
Origin & Historical Trajectory
- 2014–2016Android Shared Element Transitions
Android Lollipop introduced shared-element transitions carrying thumbnails directly into detail headers.
- 2020Material Motion 4-Pattern Spec
Codified Container Transform, Shared Axis, Fade Through, and Fade as the four canonical navigation patterns.
- 2021–2023Material You Dynamic Tonal Roles
Automated accessible light/dark palettes via Primary, Container, and Surface tonal role pairs.
- 2024–2025View Transitions & Origin Circle Reveals
Native View Transitions brought zero-jank
clip-path: circle()theme reveals and container morphs directly to the open Web.
Four engineering checks for spatial reveals & container morphs
- Match pattern to relationship: Container Transform for shared boxes, Shared Axis for directional flow, Fade Through for tabs, Circle Reveal for surface swaps.
- Keep every transition interruptible—cancel or reverse active WAAPI animations cleanly on rapid clicks or Escape.
- Preserve focus return on close and skip spatial animations cleanly when
prefers-reduced-motionis set or View Transitions are unavailable. - Contain clipped layers so 1440px and 390px viewports maintain zero horizontal overflow.
View keyword glossary notes
Container Transform — Continuous geometric morph from origin card into destination surface
Interpolates container bounds, corner radius, and surface fill from a card or FAB directly into a sheet, cross-fading inner content smoothly mid-flight.
bounds + radius + surface morph · 450ms emphasizedShared Axis X/Y/Z — X for horizontal steps, Y for vertical feeds, Z for depth hierarchy
Links sibling or parent-child views along one axis: horizontal X slide for onboarding steps, vertical Y for stacked lists, and Z scale (0.8 -> 1) for drill-downs.
X: ±30px | Y: ±30px | Z: scale(0.8->1->1.1)Trigger-origin circle reveal — Expanding clip-path: circle(0 -> R at x y) from toggle center
Computes R from button center (cx, cy) to the farthest viewport corner and animates clip-path: circle() across the new View Transition snapshot.
clip-path: circle(0 at cx cy) -> circle(R at cx cy) · 550msMaterial You tonal role pairs — Pairing Container & On-Container tokens guarantees readable contrast
Locks every background role to an accessible foreground partner—e.g. #d3e3fd pairs with #041e49, #edf2fa with #1f1f1f, #fef7e0 with #b06000.
Container + On-Container >= 4.5:1 contrastPersistent visual anchor — First-Last-Invert-Play keeps eyes locked on the originating element
Recording First and Last getBoundingClientRect() bounds, then Inverting and Playing transform, bridges any layout jump cleanly on the compositor.
FLIP: First -> Last -> Invert(dx, dy, sx, sy) -> PlayM3 transition decision map — Four quick questions to pick the right Material transition every time
Shared box? Container Transform. Directional flow? Shared Axis. Unrelated tabs? Fade Through. Overlay/theme toggle? Fade or Origin Circle Reveal.
Container | Shared Axis | Fade Through | Origin CircleContinuous geometric morph from origin card into destination surface
Interpolates container bounds, corner radius, and surface fill from a card or FAB directly into a sheet, cross-fading inner content smoothly mid-flight.
bounds + radius + surface morph · 450ms emphasizedX for horizontal steps, Y for vertical feeds, Z for depth hierarchy
Links sibling or parent-child views along one axis: horizontal X slide for onboarding steps, vertical Y for stacked lists, and Z scale (0.8 -> 1) for drill-downs.
X: ±30px | Y: ±30px | Z: scale(0.8->1->1.1)Expanding clip-path: circle(0 -> R at x y) from toggle center
Computes R from button center (cx, cy) to the farthest viewport corner and animates clip-path: circle() across the new View Transition snapshot.
clip-path: circle(0 at cx cy) -> circle(R at cx cy) · 550msPairing Container & On-Container tokens guarantees readable contrast
Locks every background role to an accessible foreground partner—e.g. #d3e3fd pairs with #041e49, #edf2fa with #1f1f1f, #fef7e0 with #b06000.
Container + On-Container >= 4.5:1 contrastFirst-Last-Invert-Play keeps eyes locked on the originating element
Recording First and Last getBoundingClientRect() bounds, then Inverting and Playing transform, bridges any layout jump cleanly on the compositor.
FLIP: First -> Last -> Invert(dx, dy, sx, sy) -> PlayFour quick questions to pick the right Material transition every time
Shared box? Container Transform. Directional flow? Shared Axis. Unrelated tabs? Fade Through. Overlay/theme toggle? Fade or Origin Circle Reveal.
Container | Shared Axis | Fade Through | Origin CircleCopy this essay’s prompt snippet (Container transform & circle reveal)
Read prompt text
Implement Google Material 3 Container Transform & trigger-origin circle reveals:
- Expand detail panels smoothly from the tapped card bounds (`420ms cubic-bezier(0.05, 0.7, 0.1, 1)`) without warping inner typography, and restore focus to the trigger upon close;
- For theme or tonal swaps, compute farthest-corner radius `R` from the button center `(cx, cy)` and animate `clip-path: circle(0 -> R at cx cy)` over 550ms;
- Pair every tonal background with its accessible foreground role (`#d3e3fd`/`#041e49`, `#eaf6ee`/`#137333`) and jump straight to final state under `prefers-reduced-motion` or missing API support.