headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

Add `TransitionProps` prop to `<Dialog />` component

Open maeertin opened this issue 1 year ago • 1 comments

This PR allows for a more flexible <Dialog /> interface as one can forward props to the internal <Transition /> component. This can for example be useful if one needs to access transition events like beforeEnter.

maeertin avatar Nov 06 '24 07:11 maeertin

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2024 7:52am
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2024 7:52am

vercel[bot] avatar Nov 06 '24 07:11 vercel[bot]

Hey!

Thanks for the PR! Going to say no for this right now, but we can re-open it if more people want this functionality.

The current thinking here is that if you are just using simple transitions that can be achieved with the data-attributes in CSS, then you can use the transition prop.

However, if you need more than that, essentially the functionality that the Transition component provides, then I would recommend to use composition and wrap a Transition component around the Dialog instead.

RobinMalfait avatar Sep 09 '25 11:09 RobinMalfait