Best way to make a game object have a "springy" toggle button feel, similar to a ballpoint pin

I have a tree object comprised of three sprites (top triangle, bottom triangle, trunk).

When a player touches the tree, I want it to compress all three sprites slightly, then have them spring open upwards on release. Touching again would reverse the state. Similar effect to pressing the top of a ballpoint pen like this:,320_.jpg

I’ve been trying it with springJoint2d and AddForce, but it can start to go (literally) sideways at points… plus I’m not sure how to make it stay at the “expanded” state.

Is there a simple solution for this?

I’ve attached the image of the tree for clarity, hopefully it makes sense. Thanks!

Relying on an sinus function might be helpful, I would create an script based animation inside an OnStayCollider and then relying on an coroutine(IEnumerator) yield return new waitforseconds() to shot the player up in sync.