Replies: 2 comments
-
You can make your own by extending export default {
theme: {
extend: {
gridTemplateRows: {
"animate-height-open": "1fr",
"animate-height-closed": "0fr",
},
},
},
}; Then consume in components: <MyAnimatedHeightWithGrid classNames="grid grid-rows-animate-height-open transition-all duration-700 ease-in-out" /> |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can also use also <div id="myElement" class="grid grid-cols-[0fr] duration-500">
<div class="overflow-hidden">
...
</div>
</div> and |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there.,
as described in this article, the height of an element can easily be animated from 0 to auto using the properties
grid-template-rows: 0fr
andgrid-template-rows: 1fr
. It would be good if these properties were added as a standard.https://keithjgrant.com/posts/2023/04/transitioning-to-height-auto/
Beta Was this translation helpful? Give feedback.
All reactions