Banner Slider for Magento 2

A Magento 2 banner slider with separate desktop, tablet and mobile images per slide, HTML overlay text, fade or slide transitions and lazy loading. Place any slider on a page with a widget, on Hyvä or Luma.

Magento 2.4.6, 2.4.8 PHP 8.1, 8.4 Hyva + Luma Ready Free

Key Features:

  • Responsive Slider Engine
  • Admin Slide Management
  • Transition Effects & Behavior
  • Hyva + Luma Dual Support

Additional Services

$0.00
In stock
SKU
panth-banner-slider
Links
Pay with Wise
Lifetime Updates Every Magento release
1-Year Free Support Email + WhatsApp
Adobe-Certified Magento 2 Developer
Free Forever No subscription, no upsell
What you get

Everything in the box

Built-in from day one. No add-ons, no upsell, no licence keys to renew.

Responsive Slider Engine

Fully responsive layout, fluid widths, aspect-ratio-aware image delivery

Admin Slide Management

Two-entity architecture, manage multiple Sliders, each with its own set of Slides

Transition Effects & Behavior

Fade or slide, choose transition effect per slider

Hyva + Luma Dual Support

Hyva template, Alpine.js only, zero jQuery, Tailwind-friendly classes

Performance & Quality

MEQP compliant, passes Adobe's Extension Quality Program

Overview

Panth Banner Slider is a responsive hero slider extension for Magento 2 and Adobe Commerce that turns homepage and category headers into measurable revenue.

The module ships unlimited banner sliders with per-slide desktop, tablet, and mobile images, fade or slide transitions, autoplay control, arrow and dot navigation, plus start and end date scheduling. Every slide includes a WYSIWYG overlay for headlines, sub-text, and CTAs, all scoped per store view so multi-brand merchants can localize creative without forking templates.

The banner slider auto-detects the active storefront: Hyvä stores render an Alpine.js plus Tailwind template, while Luma stores get a RequireJS plus Knockout template. Drop a slider on the homepage, any CMS page, a category, or any layout handle using a single widget tag — no page builder hacks, no third-party carousel libraries, and no manual asset pipeline edits.

Compatible with Magento 2.4.4–2.4.9 and PHP 8.1–8.4, the Panth Banner Slider follows Adobe MEQP standards, is translation-ready out of the box, and exposes GraphQL endpoints for headless storefronts that fetch slider data at the edge.

Best for:

  • Magento 2 merchants who run weekly homepage promotions and need scheduled campaign rotation.
  • Hyvä stores that want a hero slider without bundling a heavy carousel library.
  • Multi-store catalogs that need different banner sets per store view or locale.

What you get

The Panth Banner Slider for Magento 2 covers every requirement of a production hero carousel:

  • Unlimited sliders with per-store-view scoping and category, CMS, or layout-handle placement.
  • Separate desktop, tablet, and mobile images per slide for pixel-perfect responsive delivery.
  • WYSIWYG overlay editor for headlines, sub-text, button labels, and call-to-action links.
  • Fade and slide transitions with configurable autoplay speed, arrows, and dot navigation.
  • Start and end date scheduling to automate seasonal and flash-sale banner rotations.
  • Native Hyvä (Alpine.js) and Luma (RequireJS) templates auto-selected at render.

Magento 2 Banner Slider

Panth Banner Slider adds admin-managed banner sliders to Magento 2. A slider record holds the playback settings (transition effect, autoplay, loop, arrows, dots, pause on hover) and any number of slide records hold the images, an optional HTML overlay, a link, a sort order and a date range. A slider is placed on the storefront with the "Banner Slider" widget, a {{widget}} directive in CMS content, or a layout XML block, and is looked up by its identifier.

The module does not change any existing Magento behaviour. It adds two database tables, an admin menu under "Panth Extensions", two admin grids with edit forms, an image upload endpoint and one widget. It is used by merchants who manage promotional banners themselves and by developers who need a slider block in a theme. Two storefront templates are shipped: a Hyva template built on Alpine.js and a Luma template built on a small jQuery/RequireJS component. The template is selected automatically from the active theme through Panth\Core\Helper\Theme.

Product page: kishansavaliya.com/magento-2-banner-slider.html

Features

  • Sliders and slides are separate records: one slider can have many slides, and each slide is assigned to one slider ("Assign to Slider").
  • Admin grids "Manage Sliders" and "Manage Banners" with keyword search (sliders: title and identifier; banners: title, alt text and link URL), filters including "Store View", sorting, row actions and a mass "Delete" action.
  • Per-slider settings: "Transition Effect" (Fade or Slide), "Autoplay", "Autoplay Speed (ms)", "Transition Speed (ms)", "Infinite Loop", "Show Navigation Arrows", "Show Pagination Dots", "Pause on Hover".
  • Per-slide "Desktop Image", "Tablet Image" and "Mobile Image" uploads (jpg, jpeg, png, gif, webp; 10 MB limit; the file extension and MIME type are both checked), rendered with a <picture> element. Tablet falls back to desktop; mobile falls back to tablet, then desktop; a slide with only a tablet or mobile image uses it for every size.
  • "Content Overlay HTML" edited with the classic WYSIWYG editor (Page Builder is disabled for this field); "Link URL" makes the slide image clickable and "Link Target" can open it in a new tab.
  • "Image Alt Text" per slide.
  • "Active From" / "Active To" dates: a slide is shown only when the current date in the store timezone is inside the range; either bound can be left empty.
  • Store view scoping on both sliders and slides: records saved for "All Store Views" (store 0) or the current store view are shown. When a slider exists for both "All Store Views" and the current store view with the same identifier, the store view specific slider is used.
  • Slides ordered by "Sort Order"; inactive sliders and slides are skipped.
  • Storefront controls: previous/next arrows, pagination dots, touch swipe, left/right arrow keys while the slider or a control inside it has keyboard focus (the slider is focusable; keys typed in form fields are ignored), autoplay with pause on hover and while keyboard focus is inside the slider, and a visible "Pause slideshow" / "Play slideshow" button whenever autoplay is on. When the visitor prefers reduced motion the slideshow starts paused (the button can start it) and slides change without animation. Arrows, dots and the pause button are 44 by 44 pixel targets with labels, arrows become visible on hover or keyboard focus, and the "Show Navigation Arrows" / "Show Pagination Dots" settings also apply to the Hyva phone control bar. Controls are only rendered when a slider has more than one slide.
  • Accessibility: the slider is a labelled region announced as a carousel, each slide is a group announced as "1 of 3", the current dot has aria-current, and hidden Luma slides are inert so their links are not reachable with Tab. The overlay adds a centre shade behind the text so white overlay text keeps at least 4.5:1 contrast on light images.
  • "Transition Speed (ms)" is applied on Hyva and Luma.
  • The first slide image is loaded eagerly with fetchpriority="high"; later slides use loading="lazy" and are fetched shortly after the page has loaded, so the next slide is ready before it is shown. The slider height is reserved by CSS, so images cause no layout shift.
  • Visual values (heights, overlay colour, radius) are read from CSS custom properties, with defaults listed in etc/theme-config.json.
  • "Install Sample Data" button on the "Manage Sliders" grid asks for confirmation and then sends a POST request with the admin form key that creates five example sliders with slides and copies their images to pub/media/bannerslider/; existing identifiers are skipped. The install action does not answer GET requests.
  • Uploaded file names are checked against the Panth_Core upload extension policy before they are stored.

Usage

Widget

Content > Widgets > Add Widget, type "Banner Slider". Parameters:

Parameter Type Notes
Slider Identifier text, required The "Identifier" of the slider.
Template select "Default Template (Luma)" (default) or "Hyva Template". When the active theme is Hyva, the default template is replaced by the Hyva template automatically.

CMS page or block

{{widget type="Panth\BannerSlider\Block\Widget\BannerSlider" identifier="homepage_hero"}}

Layout XML

<block class="Panth\BannerSlider\Block\Widget\BannerSlider" name="my.banner.slider">
 <arguments>
 <argument name="identifier" xsi:type="string">homepage_hero</argument>
 </arguments>
</block>

PHTML template

<?= $block->getLayout()->createBlock(\Panth\BannerSlider\Block\Widget\BannerSlider::class)->setData('identifier', 'homepage_hero')->toHtml() ?>

Storefront behaviour

The block renders nothing when the identifier is empty, the slider is missing or inactive for the current store view, or no slide passes the active, store view and date filters. Each slider is wrapped in a div.panth-banner-slider container with a unique id, so several sliders can be placed on one page. The arrow keys only move the slider that has keyboard focus.

Overlay HTML is processed by the CMS block filter (so directives such as {{media}}, {{store}} and {{widget}} work) and is then output unescaped, as authored in the admin editor.

The block implements Magento\Framework\DataObject\IdentityInterface, so saving or deleting a slider or slide invalidates the full page cache entries of pages that show it.

Templates that can be overridden

  • Panth_BannerSlider::widget/banner_slider.phtml (Luma; uses Panth_BannerSlider/js/banner-slider through data-mage-init; styles come from view/frontend/web/css/source/_module.less)
  • Panth_BannerSlider::widget/banner_slider_hyva.phtml (Hyva; the Alpine.js component and its CSS are inline in the template)

Both templates read these CSS custom properties, with fallbacks: --banner-height-desktop, --banner-height-tablet, --banner-height-mobile, --banner-border-radius, --banner-overlay-bg, --banner-content-max-width, --banner-transition-speed, --banner-arrow-icon-size (Luma only).

Documentation

USER_GUIDE.md covers creating sliders and slides, placing a slider with the widget or a CMS directive, the slider options, CSS customisation and troubleshooting.

Changelog

See CHANGELOG.md.

Compatibility

Platform Versions
Magento Open Source 2.4.4 to 2.4.8
Adobe Commerce 2.4.4 to 2.4.8
PHP 8.1, 8.2, 8.3, 8.4 (`~8.1.0
Themes Hyva (Alpine.js template) and Luma (RequireJS template)

The Magento version range is the one published on the product page. Composer constraints on Magento packages: magento/framework ^103.0, magento/module-backend ^102.0, magento/module-cms ^104.0, magento/module-store ^101.1, magento/module-widget ^101.2, magento/module-media-storage ^100.4, magento/module-catalog ^104.0, magento/module-config ^101.2, magento/module-ui ^101.2.

Requirements

  • Magento Open Source or Adobe Commerce 2.4.4 to 2.4.8
  • PHP 8.1, 8.2, 8.3 or 8.4
  • mage2kishan/module-core ^1.0.17 (required; provides the "Panth Extensions" admin menu and ACL parent, the theme detection helper and the upload extension policy)
  • Suggested: hyva-themes/magento2-default-theme when the Hyva template is used

Installation

composer require mage2kishan/module-banner-slider
bin/magento module:enable Panth_Core Panth_BannerSlider
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

setup:di:compile is only needed in production mode. setup:static-content:deploy is needed because the module ships a LESS file and a RequireJS component under view/frontend/web/.

Check the result:

bin/magento module:status Panth_BannerSlider

Configuration

The module has no section under Stores > Configuration and writes nothing to core_config_data. Everything is configured per record in the admin under "Panth Extensions" > "Banner Slider":

  • "Manage Sliders" (route panth_bannerslider/slider/index)
  • "Manage Banners" (route panth_bannerslider/slide/index)

Manage Sliders

The grid lists ID, "Slider Name", "Identifier", "Active", "Effect", "Autoplay", "Store View" and "Created", with edit and delete row actions and a mass "Delete" action. If a save fails (for example a duplicate identifier for the same store view), the form opens again with the values that were entered. Deleting a slider keeps its slides and sets their Slider to none, so they can be assigned to another slider. Buttons: "Add New Slider" and "Install Sample Data". The edit form has these fieldsets.

"General Information"

Setting Default What it does
Slider Name (required) Internal name shown in the grid and in the "Assign to Slider" dropdown.
Identifier (required) Key used by the widget, the CMS directive and layout XML, for example homepage_hero. Starts with a letter; letters, digits, "_", "-" and "/" only. Unique per store view. A store view specific slider overrides an "All Store Views" slider with the same identifier on that store view.
Active Yes Inactive sliders render nothing.
Store View All Store Views Store view the slider is looked up for.

"Slider Behavior"

Setting Default What it does
Transition Effect Fade "Fade" or "Slide". Both templates honour it: "Slide" moves the slides horizontally (Luma with a CSS transform, Hyva with Alpine.js transitions), "Fade" cross-fades them.
Autoplay Yes Advances slides automatically.
Autoplay Speed (ms) 5000 Time between slide changes.
Transition Speed (ms) 600 Duration of the animation.
Infinite Loop Yes Wraps from the last slide to the first. When off, next/previous stop at the ends.
Show Navigation Arrows Yes Renders previous/next buttons.
Show Pagination Dots Yes Renders one dot per slide.
Pause on Hover Yes Stops autoplay while the pointer is over the slider.

"How to Use This Slider" shows the widget, template and layout XML snippets listed under Usage below.

Manage Banners

The grid lists ID, "Slider", "Title", "Active", "Image" thumbnail, "Link URL", "Sort Order", "Store View", "Created", "Active From" and "Active To", with a mass "Delete" action and edit/delete row actions. Button: "Add New Slide". The edit form has these fieldsets.

"General Information"

Setting Default What it does
Assign to Slider (required) Parent slider, listed as "Slider Name (identifier)".
Title empty Internal title for admin reference.
Active Yes Inactive slides are not rendered.
Store View All Store Views Store view the slide is shown in.
Sort Order 0 Ascending order inside the slider.

"Images"

Setting Default What it does
Desktop Image empty Shown at 1024 px and above. Recommended 1920 x 600 px.
Tablet Image empty Shown between 768 px and 1023 px. Falls back to the desktop image.
Mobile Image empty Shown below 768 px. Falls back to the tablet image, then the desktop image.
Image Alt Text empty alt attribute of the image. When empty, "Banner N" is used.

"Content & Link"

Setting Default What it does
Content Overlay HTML empty HTML rendered on top of the image; CMS directives are supported. On the Hyva template the link wrapper is omitted when overlay content is present so links inside the overlay stay clickable.
Link URL empty Relative path or a URL using http, https, mailto or tel; leave empty for no link. Other schemes such as javascript: or data: are rejected on save and are not rendered.
Link Target Same Window "Same Window" or "New Tab". "New Tab" renders the link with target="_blank" and rel="noopener noreferrer".

"Schedule"

Setting Default What it does
Active From empty First date the slide is shown.
Active To empty Last date the slide is shown. Cannot be earlier than "Active From"; the save is refused with a message and the form keeps the entered values.

Images are uploaded to pub/media/bannerslider/ (temporary uploads go to pub/media/bannerslider/tmp/).

Uninstallation

bin/magento module:disable Panth_BannerSlider
composer remove mage2kishan/module-banner-slider
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

The tables panth_banner_slider and panth_banner_slide and the images in pub/media/bannerslider/ are not removed. The module stores no values in core_config_data. Widget instances and CMS content that reference the block class must be removed by hand.

License

Free and open source under the MIT License. See LICENSE.txt.

Developer Notes

  • Module name: Panth_BannerSlider; Composer package: mage2kishan/module-banner-slider; namespace: Panth\BannerSlider.
  • Loads after Magento_Cms, Magento_Store, Magento_Widget, Magento_Backend and Panth_Core.
  • Block\Widget\BannerSlider (implements Magento\Widget\Block\BlockInterface): getIdentifier(), getSlides(), canDisplay(), getSliderConfig(), getSliderConfigJson(), getMageInitJson() (Luma data-mage-init payload with the pause/play labels), getUniqueId(), getHelper(), getTemplate().
  • Helper\Data: getSliderByIdentifier(), getSlidesByIdentifier(), getSlidesBySliderId(), isEnabled(), getSliderConfig(), getImageUrl(), getResponsiveImages().
  • Models Model\Slider (event prefix panth_banner_slider, cache identities panth_banner_slider and panth_banner_slider_<id>) and Model\Slide (event prefix panth_banner_slide, cache identities panth_banner_slide_<id> and panth_banner_slider_<slider_id>), with resource models and collections under Model\ResourceModel.
  • Grid keyword search: Ui\DataProvider\KeywordFilter (LIKE search on configured columns) is wired through the virtual types Panth\BannerSlider\Ui\SliderGridDataProvider and Panth\BannerSlider\Ui\SlideGridDataProvider in etc/adminhtml/di.xml, because the tables have no FULLTEXT index.
  • Option sources: Model\Config\Source\TransitionEffect (fade, slide) and Model\Config\Source\SliderOptions (all sliders).
  • Virtual type Panth\BannerSlider\ImageUploader (Magento\Catalog\Model\ImageUploader with base path bannerslider) is injected into Controller\Adminhtml\Upload\Image and Controller\Adminhtml\Slide\Save.
  • etc/frontend/di.xml registers the module with Panth\Core\ViewModel\ThemeConfig; etc/theme-config.json holds the default CSS variable values.
  • Admin route: panth_bannerslider (controllers slider/* including slider/massDelete, slide/*, upload/image, sampleData/install). sampleData/install accepts POST only; the grid button is provided by Block\Adminhtml\Slider\InstallSampleDataButton.
  • ACL resources: Panth_BannerSlider::slider ("Banner Slider - Manage Sliders") and Panth_BannerSlider::slide ("Banner Slider - Manage Banners"), under Panth_Core::panth_extensions.
  • UI components: panth_bannerslider_slider_listing, panth_bannerslider_slider_form, panth_bannerslider_slide_listing, panth_bannerslider_slide_form.
  • Database tables (etc/db_schema.xml): panth_banner_slider (unique on identifier + store_id) and panth_banner_slide (indexed on slider_id, is_active, sort_order).
  • Sample data lives in Setup/SampleData/*.json with images in Setup/SampleData/images/.
  • No plugins, observers, cron jobs, console commands or web API routes are declared.
More Information
Module Category Theme & UI
Best For All Sizes
FAQ

Frequently Asked Questions

Can I have more than one banner slider on the same page?

Yes. Create as many sliders as you want in the admin and place each one via its own widget or layout block. Each slider maintains independent configuration and slides.

Does it work with Hyva Theme?

Yes. Panth Banner Slider ships a native Hyva template using Alpine.js, no jQuery, no RequireJS shim. The module auto-detects Hyva and swaps the template automatically.

Does it work with the default Luma theme?

Yes. A separate Luma template is included with RequireJS-based initialization. No Slick or Owl Carousel dependencies are required.

Can I schedule slides for a promotion?

Yes. Every slide has optional Start Date and End Date fields. Slides automatically appear and disappear based on the configured schedule.

Can I display different slides per store view?

Yes. Each slide has a Store View selector, so you can scope slides to specific stores in multi-store setups.

Is the slider SEO friendly?

Yes. Images use proper alt attributes, slides render as real <img> tags (not background images), and links are real <a> tags that crawlers can follow.

Does it affect Core Web Vitals / page speed?

The module is optimized for LCP, the first slide image is eagerly loaded while subsequent slides are lazy loaded. On Hyva, there is no jQuery penalty; on Luma, only the minimal required JS is shipped.

Can I translate the admin labels?

Yes. The module uses Magento's standard __() translation function, so every user-facing string can be translated via the standard i18n workflow.

Can I customize the slider template?

Yes. Override the template files in your theme via standard Magento theme fallback (app/design/frontend/<Vendor>/<theme>/Panth_BannerSlider/templates/...).

Do I need Panth Core?

Yes. mage2kishan/module-core is a required dependency and is installed automatically by Composer. It is free forever and provides the unified admin menu and shared utilities for all Panth extensions.


Need this customised?

Talk to Kishan directly: written quote, scope and timeline within 24 hours. No sales call.

Banner Slider for Magento 2

$0.00
Step up

Customers usually upgrade to

Chat on WhatsApp