Closed Knaackee closed 3 months ago
You can just hide the Dialog.Trigger
with CSS. The Dialog.Content
is mounted only when opened
Yeah sure, but I am not using the trigger. I control the open state by myself using the open
prop.
Hello :)
I'm actually struggle with the same issue. I only want to show the modal on mobile resolution. If I have more screen real estate we should the same form in a sidebar to make the rest of the page still be interactive
This isn't a primitive concern, it's a styling concern, you can decide to show elements whenever you want, either with CSS. You can even decide to enable functionality based on JS using a resize observer.
@Knaackee @micahjonas Have you found a solution for that? I can hide the content with tailwind css, but the background from the Dialog is still there.
@Knaackee @micahjonas Have you found a solution for that? I can hide the content with tailwind css, but the background from the Dialog is still there.
At the end I just found out. I was using shadcnui, and SheetContent
is integrating the SheetOverlay
and the SheetPortal
.
You can hide with Tailwind CSS in the className of the Portal and the Overlay then.
So in the context of Radix, you can then hide the DialogContent and DialogOverlay
Hey!
At first, thanks for the great work.
I would like to hide the dialog if the size of the users' window is lower than tailwinds md breakpoint. (I show a Sheet instead).
Since I can't apply classNames to the Dialog.Root I tried many things. But nothing really works completely.
Any idea on how to achieve this?