Field form active states and keyboard slide in

Hi there Figma people!
I want to create a form that does the following on a mobile app mock up:
1 - First the button should switch states and go from Unselected to Selected. ( the appearance should change with a stroke around the box )
2 - Then the keyboard should slide in.
3 - The keyboard should slide back down when the user taps other elements or outside the form field.
I could achieve this already with the smart animate feature but I would like to scale it to the entire form and I wouldn’t know how to do it.
Any tips, tutorials or plugins I could use to make this happen?
Thanks a lot!