# "fold" animation in elm-css

**URL:** <https://discourse.elm-lang.org/t/fold-animation-in-elm-css/6284>\
**Category:** Learn\
**Created:** [September 17, 2020, 4:30pm UTC](https://discourse.elm-lang.org/t/fold-animation-in-elm-css/6284 "2020-09-17T16:30:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![hexedhash](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/hexedhash/32/3384_2.png) [@hexedhash](https://discourse.elm-lang.org/u/hexedhash)\
**Post date:** [September 17, 2020, 4:58pm UTC](https://discourse.elm-lang.org/t/fold-animation-in-elm-css/6284/4 "2020-09-17T16:58:02Z")

</div>

> Why does that seem hacky to you?

Suppose there are 3 alerts on the page, all of which have different heights. For each alert I need to generate a unique `id` value to call `Browser.Dom.getElement` and get the correct value back. Generating unique ids would likely impact the user-facing API of the alerts. And I want to make sure that the alert API is intuitive and simple.

---

_[View the full topic](https://discourse.elm-lang.org/t/fold-animation-in-elm-css/6284)._
