Shrink on Scroll

Does anyone know of a way to shrink items when the user scrolls?

On the home page of my app I have a heading and a search bar. I would like these items to shrink in size when the user scrolls.

Please see screenshot for items I’d like to shrink