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

Optionally remove margins around Dialog #5765

Open
rolfsmeds opened this issue Apr 18, 2023 · 0 comments
Open

Optionally remove margins around Dialog #5765

rolfsmeds opened this issue Apr 18, 2023 · 0 comments
Labels
enhancement New feature or request vaadin-dialog

Comments

@rolfsmeds
Copy link
Contributor

Describe your motivation

There are at least two common UI patterns that call for a dialog (or similar overlay) that sits flush with the edges of the browser viewport:

  • Full-screen modals on mobile (these are different from "views" in that they don't require navigating away from the current view, and they typically obscure the app's navigation controls). Full-screen modals are often used on mobiles to maximize utilization of the small viewport.

  • Side panel overlays (modal or not) on bigger viewports, e.g.:
    image

The Dialog component currently doesn't make it easy to achieve due to the --lumo-space-m margin that always surrounds them:
image
image

Describe the solution you'd like

In addition to a positioning API as proposed in #1060 and vaadin/flow-components#1173, it would be nice to also have a way to disable the margin.

This could be either through a margin API e.g. setMargin(boolean) / no-margin, or a theme variant.

Describe alternatives you've considered

No response

Additional context

No response

@yuriy-fix yuriy-fix added enhancement New feature or request vaadin-dialog labels Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vaadin-dialog
Projects
None yet
Development

No branches or pull requests

2 participants