Responsive Page Builder Slider Fix for Magento 2
- Compatibility
- 2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0
- Hyvä theme
- Hyvä compatible
Description / Responsive Page Builder Slider Fix for Magento 2
MAGENTO 2 · PAGEBUILDER · SLIDER · LUMA AND HYVÄ
Fit the slider to the image and your customer’s screen.
Kowal PageBuilder Slider Fix
Keep the native PageBuilder slider and improve its proportions and desktop/mobile image selection. Use the standard version for Luma or the Hyvä adapter included in the package.
Image proportions · Desktop/mobile images · Configurable breakpoint
HOW IT WORKS IN PRACTICE
01 · Prepare your images
Add desktop and mobile images in PageBuilder.
02 · Choose the settings
Configure the proportions and mobile version threshold.
03 · The slider adapts the presentation
The mechanism changes the image and geometry for the screen.
What does your store gain?
Explore the module’s features, use cases, and settings.
Meet the module
Magento PageBuilder offers a native slider that is designed to be a great solution:
it does not require external libraries,
it is fully integrated with the content editor,
it supports separate images for desktop and mobile,
it works correctly with cache, Varnish, and PageBuilder Preview.
And that is exactly why it is worth using.
Unfortunately, in practice many Magento stores encounter the same problems, especially with modern, responsive layouts.
Problems with the native PageBuilder slider
In the standard PageBuilder configuration:
the slider height is rigidly enforced (
min-height),image proportions do not come from the actual dimensions of the graphic,
on mobile, empty margins appear above and below the slider,
the slider does not always respond correctly to breakpoint changes,
PageBuilder CSS and JS force behaviors that are difficult to override without modifying the core.
The result?
The slider often looks good on only one screen –
and at other resolutions, it loses its proportions or visual appeal.
What does our module do?
Kowal PageBuilder Slider Fix solves these problems without disabling PageBuilder and without modifying the Magento core.
The module:
removes PageBuilder’s rigid height enforcement (
min-height),allows the slider to dynamically adjust its height to the image,
supports full-width presentation (
100% viewport width),properly handles separate desktop and mobile images,
works only where the slider actually exists.
How does it work technically?
uses
text/x-magento-init– Magento’s native mechanism,initializes behavior through the slider selector,
works per slider, not globally,
works with PageBuilder’s
data-background-imagesmechanism,is compatible with PageBuilder Preview and the CMS editor.
This means:
✔ reduced need for additional libraries; compatibility requires verification
✔ cooperation with cache should be checked in the store
✔ scope of work limited to handling slider presentation
Who is this module for?
This module is ideal if:
you use the PageBuilder Slider or Banner Slider,
you care about perfect responsiveness,
you want to keep native Magento solutions,
you do not want to install heavy external sliders,
you care about mobile aesthetics with no empty margins.
Why not an external slider?
External sliders:
often load large JS libraries,
do not integrate perfectly with PageBuilder,
can be problematic with cache / Varnish,
make content editing harder for non-technical users.
Our module fixes what needs to be fixed – and nothing more.
Summary
Kowal PageBuilder Slider Fix:
preserves the benefits of the native Magento slider,
eliminates its biggest drawbacks,
improves presentation on desktop and mobile,
is lightweight, fast, and secure,
is intended for implementation after checking the theme and configuration.
If you use PageBuilder – this module should be its natural extension.
Aspect ratio and mobile version settings
Stores → Configuration → Kowal → PageBuilder Slider Fix provides Desktop Width / Height, Mobile Width / Height, and Mobile Breakpoint. The default values are 1920 × 800, 768 × 976, and 768 px. The mobile threshold also includes a screen exactly 768 px wide.
In Luma, the height script uses the natural dimensions of the background image; the Hyvä adapter uses the configured proportions for slide geometry. Image changes respond to resize and orientationchange. If the mobile image is missing, the desktop image is used.
Hyvä — the adapter is part of the package
For Hyvä, also enable Kowal_PageBuilderSliderFixHyva and set Hyva Compatibility → Enable Hyva Slider Fix to Yes in the relevant store view. The adapter switch is disabled by default. Do not install it separately alongside the main package.
The adapter supports Hyvä WebP image fields and the background lazy loading flag. The native theme handles carousel navigation and playback. Custom slider markup must preserve the required PageBuilder elements and attributes.
Scope of operation and theme fit
In Luma, initialization uses text/x-magento-init and the .pagebuilder-slider selector, without an additional carousel library. The initialization template is added in the default layout; working with images applies to slider elements present on the page.
Check the proportions, theme CSS, breakpoints, PageBuilder preview, and behavior with cache and Varnish in your store. The effects apply to how banners are presented; no conflicts and zero performance impact are not universal guarantees.
Installation via Composer
Package kowal/module-pagebuildersliderfix, module Kowal_PageBuilderSliderFix. After configuring access to the Kowal repository, install the package, enable the module, update Magento, and clear the cache. In production, include compilation and static content deployment according to the store’s process.
From configuration to results
1. Prepare your images
Add desktop and mobile images in PageBuilder.
2. Choose the settings
Configure the proportions and mobile version threshold.
3. The slider adapts the presentation
The mechanism changes the image and geometry for the screen.
Horizontal banner on desktop, vertical on phone
For desktop, you prepare a wide image, and for mobile, a separate vertical version. When the screen width changes, the module selects the appropriate image.
If the mobile version is missing, the desktop image is used. Slide scrolling and playback remain the responsibility of the native slider.
Improve banner presentation without rebuilding content
Want to tailor the module to your store? Ask about implementing Kowal PageBuilder Slider Fix and discuss the configuration or required extensions.
More Information
Questions and Answers
Does the module work with separate desktop and mobile images?
Does the module affect store performance?
Is the module safe during Magento updates?
Does the module work with cache, Varnish, and PageBuilder Preview?
Module Installation Instructions
Installation via Composer
You will receive access details for the Composer repository, including the customer email address and license token, by email after purchase. They are also available in the customer panel after logging in at kowal.store. Replace TWOJ_EMAIL_KLIENTA with your account email address and TWOJ_TOKEN with the token you received. Run the commands in the Magento root directory.
composer config repositories.kowal composer https://repo.kowal.storecomposer config http-basic.repo.kowal.store 'TWOJ_EMAIL_KLIENTA' 'TWOJ_TOKEN'composer require kowal/module-pagebuildersliderfixCompleting the installation
After installing the package, update Magento and clear the cache:
php bin/magento setup:upgradephp bin/magento cache:flushIn a production environment, also perform DI compilation and static file deployment according to your store’s deployment process.
Customer Reviews
Slider w końcu wygląda tak samo dobrze na desktopie, jak i na telefonie.
Project: toursport.pl
Technology: Magento 2 + PageBuilder
Problem: The homepage slider lost its proportions on mobile—empty margins appeared above and below the graphic, and the height was artificially forced regardless of screen size.
Challenge
The Toursport team used the native PageBuilder slider because of:
easy content editing,
the ability to set separate desktop / mobile images,
good integration with cache and performance.
At the same time, PageBuilder’s default behavior caused:
an unattractive slider appearance on smartphones,
failure to preserve image proportions,
issues when changing resolutions.
Solution
Kowal PageBuilder Slider Fix was applied, which:
removed the fixed
min-height,allowed the slider height to adjust to the actual image proportions,
kept the full screen width,
properly handled mobile images.
Result
✔ perfect responsiveness on all devices,
✔ no empty margins on mobile,
✔ native PageBuilder preserved without additional sliders,
✔ improved visual perception of the homepage.
The module was implemented without affecting performance and without the need to modify content in PageBuilder.