Animating height: auto — nemzes.net
Ever tried to animate or transition the height of an element that has dynamic dimensions? It's frustrating and unsatisfactory. Here are two strategies to make it better.
Animating height: auto — nemzes.net Animating height: auto Posted Oct 31, 2021 ; updated Dec 15, 2021 (If you want to skip the background, go straight to the fun part of this post .) Can you make it expand and collapse? This is one of the most common requests in a complex user interface: make an HTML element expand and collapse on toggle. This is a great way to hide complexity and features that aren't frequently in use. In CSS, we can simply set display: none on the collapsed state and be done with it. In the following example we set the toggle state based on whether the checkbox is checked or
related reading
- Using CSS Transitions on Auto Dimensions | CSS-Trickscss-tricks.com
- Details That Make Interfaces Feel Betterjakub.kr
- Inside Framer's Magic Motionnan.fyi
- On UI Animations - Shu Dingshud.in
- Transitionsanimations.dev
- An Interactive Guide to CSS Transitions • Josh W. Comeaujoshwcomeau.com
- The Web Animation Performance Tier List | Motion Magazinemotion.dev
- 7 Practical Animation Tipsemilkowal.ski
- Crafting the Next.js Websiterauno.me
- The Web Animation Performance Tier List | Motion Magazinemotion.dev
- will-change in CSSjakub.kr
- Building a Magical 3D Button with HTML and CSS • Josh W. Comeaujoshwcomeau.com