Did you know that you can make an expander using native HTML elements? With <details> and <summary> you donβt need any JavaScript to create the same result as above. With CSS you can style all parts of the details element, including the little dropdown arrow.
Itβs sadly not animatable as the example youβre displaying, but it does alleviate a lot of unnecessary JavaScript, and itβs semantically correct(!!!) π
Did you know that you can make an expander using native HTML elements? With
<details>
and<summary>
you donβt need any JavaScript to create the same result as above. With CSS you can style all parts of the details element, including the little dropdown arrow.Itβs sadly not animatable as the example youβre displaying, but it does alleviate a lot of unnecessary JavaScript, and itβs semantically correct(!!!) π
Hereβs some more information about it: developer.mozilla.org/en-US/docs/W...
Thank you for the tips! ππ₯