How components animate
- Components only do work while something moves. A settled shape, a determinate indicator at rest or a pressed button that finished its morph stops updating.
- On Apple platforms, spinning shapes use Core Animation.
- Shapes and morphs are built once and cached, so morphing never recomputes the geometry.
- Continuous animations pause when off-screen, when their screen or route is hidden and when the app is in the background, and they follow Reduce Motion.
Tips
- Show the indicators you need. A moving wave or an indeterminate loader redraws every frame by design.
- Use
flator an amplitude of 0 for progress bars that sit still for a long time. - Keep fast-changing values (progress, slider value) in the smallest component that displays them.
- Measure with release builds; debug builds are slower on every platform.
Platform guidance
SwiftUI
- Prefer
M3EMaterialShape(spinDuration:)to aTimelineView-driven rotation. - Keep
@Statefor progress local to the view that shows it.