中文
← 0203 / 030%

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.

Tune controls · watch live telemetry
LAB 03 · CONTAINER TRANSFORM & CIRCLE REVEALExpand cards above · trigger corner circle reveals below

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.

1. Card-to-Sheet Container Transform (Press Esc to collapse & restore focus)
2. Click-Origin clip-path: circle() Reveal (Click any corner button)
Active tonal surface: Blue #edf2faClick 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.

Monograph 03 · ~16 min read · 6 visual hovercards·Hover or tap dotted terms for visual notes

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

  1. 2014–2016Android Shared Element Transitions

    Android Lollipop introduced shared-element transitions carrying thumbnails directly into detail headers.

  2. 2020Material Motion 4-Pattern Spec

    Codified Container Transform, Shared Axis, Fade Through, and Fade as the four canonical navigation patterns.

  3. 2021–2023Material You Dynamic Tonal Roles

    Automated accessible light/dark palettes via Primary, Container, and Surface tonal role pairs.

  4. 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.

Act I · Origins & Philosophy

1. Evolution: Turning Fragmented Cuts Into One Spatial Surface

Early web and mobile apps treated every route change as a total reset: tear down the old view, slide in a blank page from the right. That works between unrelated chapters, yet feels jarring when tapping a thumbnail that ought to open right where your finger rests.

Beginning with Android Lollipop’s Shared Element transitions in 2014 and culminating in the 2020 Material Motion spec, Google reframed navigation as objects growing and sliding across one persistent spatial desk.

When Material You introduced dynamic tonal palettes—and modern browsers shipped the View Transitions API—the web gained native snapshots capable of smooth and card-to-sheet morphs with minimal boilerplate.

2. Design Philosophy: Zero Eye Re-Orientation & Spatial Honesty

Human eyes expend far more energy re-locating landmarks after an abrupt screen cut than they spend reading text. When a tapped card vanishes and reappears from nowhere, users suffer micro-disorientation hundreds of times a day.

and enforce spatial honesty: every big visual change walks a visible path from its cause. A card swells out of its own footprint; a new color sweeps outward from the exact button that triggered it.

Because the brain tracks that unbroken path, closing the detail sheet back down feels natural and reassuring—even without toast confirmations.

Act II · How the Craft Is Constructed

3. Mapping the Four Spatial Transitions: Choosing the Right Track

Applying giant morphs everywhere causes motion sickness. Material teams route navigation through a strict :

1) Container Transform pairs persistent elements (card to sheet, mini-player to full screen). 2) binds directional relationships: X slides horizontal onboarding steps, Y shifts stacked feeds, and Z scales drill-down hierarchies (0.8 -> 1 entering while outgoing exits 1 -> 1.1).

3) Fade Through handles unrelated bottom-nav tabs by fading the old view cleanly out over 90ms before bringing the new view in with a calm 0.92 -> 1 rise over 210ms. 4) Fade covers dialogs and menus.

4. Under the Hood: FLIP Bounds & View Transition Circle Math

On the open Web, smooth container expansion without giant libraries relies on (First-Last-Invert-Play): measure the card’s initial getBoundingClientRect() (First), apply the expanded sheet state and measure destination bounds (Last), immediately apply an inverse transform back onto the starting footprint (Invert), and animate cleanly to transform: none over 420ms via Material Emphasized easing (Play).

Origin-anchored theme swaps follow the same corner-distance rigor at viewport scale: find the trigger button center (cx, cy) and compute R = Math.hypot(Math.max(cx, w - cx), Math.max(cy, h - cy)).

Inside document.startViewTransition(), animate clipPath: ["circle(0px at cx cy)", "circle(Rpx at cx cy)"] across ::view-transition-new(root) (or fall back smoothly to a local clipped overlay layer where needed).

5. Material You Tonal Roles: Keeping Dynamic Palettes Harmonious

The fastest way to break a joyful multi-theme UI is swapping background colors without updating paired ink tokens—causing dark headings to vanish into saturated panels.

prevent contrast failure by banning standalone colors. Every surface token ships as a strict pair: #d3e3fd container binds #041e49 text; #eaf6ee mint pairs with #137333; #fef7e0 amber pairs with #b06000.

Wherever a circular reveal lands, typography stays effortlessly above WCAG 4.5:1 legibility.

Act III · How to Design Something Similar

6. Playbook for Beginners: Three Simple Spatial Upgrades

You do not need complex cross-page routers to bring Material spatial coherence to your own site or web app.

First, upgrade your theme or palette toggle to a 500–600ms clip-path: circle() expansion anchored at the button center—instant delight in a dozen lines of code. Second, when opening card previews, preserve the card’s 24px radius and tonal fill while entering gently from scale(0.94) along cubic-bezier(0.05, 0.7, 0.1, 1).

Third, glide segmented tab thumbs smoothly across room bars and animate viewport height changes rather than letting lower sections snap upward abruptly.

7. Playbook for Designers: Non-Blocking Choreography & Async Guards

In real applications, senior designers must plan for slow networks and rapid impatient tapping. Never block container expansion waiting on an API call—morph the surface immediately into a clean detail frame with skeleton slots.

Second, keep every spatial animation interruptible: if a user hits Escape or clicks back halfway through a 450ms expansion, cancel or reverse the active WAAPI animation cleanly instead of locking inputs.

Finally, scope playful tonal circle reveals strictly to the intended showcase or theme canvas while keeping global navigation anchors steady, and pair 420ms openings with slightly crisper ~340ms closings so exiting never lingers.

8. Engineering Verification: Graceful Fallbacks, Focus & Zero Overflow

Before shipping spatial transitions, verify three production safeguards. First, guard document.startViewTransition cleanly against unsupported browsers and prefers-reduced-motion: reduce, falling back immediately to direct state updates with zero exceptions.

Second, uphold overlay focus contracts: move keyboard focus intentionally into expanded sheets or dialogs, support Escape dismissal, and restore focus to the originating card button upon close.

Third, test across 1440px desktop and 390px mobile widths while rapidly toggling triggers: clip animated layers cleanly inside bounded stages so documentElement.scrollWidth never exceeds clientWidth and no dangling WAAPI animations leak.

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-motion is 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 emphasized

Shared 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) · 550ms

Material 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 contrast

Persistent 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) -> Play

M3 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 Circle

Copy 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.

Shown once per release · Always available in changelog