Modified animate component according to animate function in foundationApi