uiContourCrossfadeBlurFraction function

double uiContourCrossfadeBlurFraction(
  1. double progress
)

How much blur a Contour cross-dissolve should carry at a given progress, as a 0..1 fraction of a caller-chosen peak sigma. Peaks at the midpoint and resolves to zero at both rest ends — a brief, soft blur while content is mid-swap, not a blur held throughout the transition. This is what reads as "glass" in Apple's own system content transitions (SF Symbols content-transition, tab bar item swaps) rather than a flat cross dissolve.

Pure function of progress — no widgets, no platform or effects-tier checks. buildUiContourCrossfade is the usual entry point; call this directly only when composing a custom visual treatment.

Implementation

double uiContourCrossfadeBlurFraction(double progress) {
  return math.sin(math.pi * progress.clamp(0.0, 1.0));
}