Skip to main content

breathing

Function breathing 

Source
pub fn breathing<E>(element: E, id: impl Into<ElementId>) -> AnimationElement<E>
where E: IntoElement + Styled + 'static,
Expand description

Slowly breathes an element’s opacity — for indicators that mean “still working” without a measurable progress value.

Breathes at the crate’s default ambient tempo: this signature predates MotionTokens and carries no App, so it has no way to see a replaced policy. Components inside the crate route through the policy instead; under the default tokens the two are identical.

This low-level compatibility helper returns GPUI’s AnimationElement; callers must unmount it while offscreen. The library’s composed looping components additionally suspend when clipped by a scroll container.