Skip to content

Add viewport modifier to resize plugin - #4910

Open
BillyNoyes wants to merge 3 commits into
alpinejs:mainfrom
BillyNoyes:feature/resize-viewport
Open

BillyNoyes wants to merge 3 commits into
alpinejs:mainfrom
BillyNoyes:feature/resize-viewport

Conversation

@BillyNoyes

@BillyNoyes BillyNoyes commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

What

Add an x-resize.viewport modifier that reports the visual viewport dimensions and reacts to window.visualViewport resize events. This keeps viewport-aware layouts responsive to mobile browser controls and on-screen keyboards without adding visual viewport behavior to the generic x-on directive.

When the Visual Viewport API is unavailable, the modifier falls back to independently observing the document element so every subscriber receives an initial measurement.

This follows the direction discussed in #4350 to house visual viewport resize handling in the Resize plugin.

Assisted-By: devx/01a80b4a-afc0-4fff-ab03-cfaf238bf0d9
Assisted-By: devx/01a80b4a-afc0-4fff-ab03-cfaf238bf0d9
Assisted-By: devx/01a80b4a-afc0-4fff-ab03-cfaf238bf0d9
@BillyNoyes
BillyNoyes marked this pull request as ready for review September 15, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant