Animating momentarily with LVGL

I’m looking for tips on how to animate some UI elements, such as making a text label bounce while a sensor is in a specific state. My question is more about where to actually put the loop that updates the widget.