-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: use the same Dialog across component #1573
Comments
i knew it, but when i tried to place the
moving the |
in app.vue something like this:
but just realized it might not work if i've multiple modals. to make it clear, let's say i've these modals:
and i want to trigger them across components:
is the only one way is to reimport the |
i got it working after reading about controlled dialog in Ark UI's docs. hmm 👀 so, i just stopped using the |
Describe the feature
I checked the docs about abstracting the Dialog component:
But it’s not clear how to use the same
Dialog
across components.I’m confused about why
DialogTrigger
needs to be insideDialogRoot
.In other libraries, like HeadlessUI and NuxtUI, you don’t have to define the trigger inside a root component. This makes it easier to toggle the dialog’s state — for example, with Pinia, I could just toggle the same modal by clicking a button in any components.
Could you share the best way to do this in Reka UI?
I just migrated from Headless UI and recently fell in love with Reka UI. Great work! Thanks!
Additional information
The text was updated successfully, but these errors were encountered: