pub fn transition<T>(
id: impl Into<TransitionId>,
target: T,
policy: Transition,
window: &mut Window,
cx: &mut App,
) -> Twhere
T: Interpolate + PartialEq + 'static,Expand description
Returns the current value for a CSS-like transition toward target.
State is keyed by id. The first value is adopted immediately; later target
changes transition from the value sampled at that instant. Components opt
into this function explicitly—base components do not install default motion.
Call this while rendering an element, where GPUI keyed element state is available. A channel id must identify one value type within that element.