2 Replies
Basically when you press one it toggles a class which has the appropriate style changes and transition values
You only have to be considerate of CSS properties you can't animate e.g display: none so you have to make use of overflow: hidden and some sizing on the container
You kind of have to think of it as a window opening up to reveal the input box that was always there rather than trying to make an input box appear
View-transition api will be helpful to learn now so you've got it figured out when it's supported everywhere