Add an animation for when an element changes