-
Hey all, Is it currently possible to combine a modal popover with a dialog-style overlay? This is a common pattern in new user onboarding tours--admittedly an annoying one sometimes, but I think there are legit use cases. I could probably hack it by adding a massive box shadow to a modal popover ( Existing standalone react libs that do this: Maybe this would be an optional overlay component on popover? Or if it was a new component the API might look like this (just spitballin'): import * as TourPoint from '@radix-ui/react-tour-point';
export default () => (
<TourPoint.Root>
<TourPoint.Trigger />
<TourPoint.Portal>
<TourPoint.Overlay />
<TourPoint.Content>
<TourPoint.Title />
<TourPoint.Description />
<TourPoint.Close />
<TourPoint.Arrow />
</TourPoint.Content>
</TourPoint.Portal>
</TourPoint.Root>
); Real world examples: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
Hey @sampl this would definitely be cool to build. It seems the solutions you link to have a ton of cool features. You could probably hack something around right now using It seems this pattern alltogether would need quite a bit of research to see how it can be made accessible seeing that it needs to "isolate" portions of the rendered page rather than separate modal content. But I am sure it would be possible. Thanks for the suggestion! ✌️ |
Beta Was this translation helpful? Give feedback.
-
I also have a need for an overlay for the popover, select, etc. from Radix. I work on an app where the CSS |
Beta Was this translation helpful? Give feedback.
-
FWIW I ended up doing this:
I can make a codepen later if yall want it EDIT: Codepen here: https://codesandbox.io/s/festive-grass-21wlxo |
Beta Was this translation helpful? Give feedback.
FWIW I ended up doing this:
modal="true"
div
for the backdrop (not a RadixDialog.Overlay
, just a styled div) and only render it if the popover is openz-index: 99999;
but only when the popover is openI can make a codepen later if yall want it
EDIT: Codepen here: https://codesandbox.io/s/festive-grass-21wlxo