Any idea on how to create this animation in the video?

this comes from Nextjs Docs
2 Replies
Darryll
Darryll5mo ago
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
clevermissfox
clevermissfox5mo ago
View-transition api will be helpful to learn now so you've got it figured out when it's supported everywhere