Skip to content
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

Popover Overlay #3771

Open
createwithjames opened this issue Apr 1, 2025 · 3 comments
Open

Popover Overlay #3771

createwithjames opened this issue Apr 1, 2025 · 3 comments
Labels
enhancement New feature or request triage v3 #1289

Comments

@createwithjames
Copy link

createwithjames commented Apr 1, 2025

Description

In Nuxt UI v2, the Popover component included an overlay option, allowing developers to add a backdrop behind the popover when opened. However, this functionality is missing in v3.

Adding overlay support would improve usability by preventing interactions with the background content and providing a nice user experience in scenarios where the popover is used as a modal-like element.

Expected Behaviour

  • A new overlay prop (boolean) should be available in the Popover component.
  • When overlay is true, a semi-transparent backdrop should be rendered behind the popover.
  • Clicking the overlay should close the popover (unless dismissible is false).

Use Case

  • Prevent background interactions when the popover is active.
  • Improve accessibility by visually separating the popover from background content.
  • Maintain consistency with Nuxt UI v2 functionality.

Current Workaround

Developers currently have to manually add an overlay element and handle its behaviour separately, which is less efficient and inconsistent with other Nuxt UI components that support overlays.

Proposed Solution

Reintroduce the overlay functionality from v2, ensuring it aligns with the new architecture in v3.

Would be great to get feedback on whether this aligns with the roadmap for v3. Thanks!

FYI - I also have a branch that's pretty much ready for PR

Additional context

No response

@createwithjames createwithjames added enhancement New feature or request triage v3 #1289 labels Apr 1, 2025
Copy link
Member

There is no overlay at the moment but you can use the modal prop to prevent interactions with the background: https://ui.nuxt.com/components/popover#props

@createwithjames
Copy link
Author

Thanks for the clarification! I had a go at implementing the overlay enhancement myself and have a branch ready for review. Since this is my first time contributing to open source, I’d really appreciate some guidance on the right process for submitting this.

Would you be able to point me to the best place to open a PR and any specific contribution guidelines I should follow? Looking forward to your feedback!

@HugoRCD
Copy link
Member

HugoRCD commented Apr 2, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage v3 #1289
Projects
None yet
Development

No branches or pull requests

3 participants