Dialogs get the hidden
attribute when being closed
#906
-
I'm trying out using and animating the dialog component. I'm using Tailwind CSS, which comes with a CSS reset that includes the following style: /*
Make elements with the HTML hidden attribute stay hidden by default.
*/
[hidden] {
display: none;
} Using Zag, dialogs get the
I'm also asking there since this is somewhat related and I don't want to create too many issues. To animate the dialog's backdrop differently than the dialog's content, I had to use Headless UI's transition component. Ideally, my only dependency would be Zag. Do you have recommendations for properly animating dialogs? Would a transition component similar to Headless UI's would be useful within Zag? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @innocenzi, We use You have two options here:
Here's a reference to how to set up the presence component in [Zag.js] and [Ark UI] I hope this helps you. |
Beta Was this translation helpful? Give feedback.
Hi @innocenzi,
We use
hidden
for most components because that's the framework-agnostic way of hiding elements.You have two options here:
hidden={false}
on the elements you want to remain visible and manage that attribute based on the transition timings.Here's a reference to how to set up the presence component in [Zag.js] and [Ark UI]
I hope this helps you.