Responsive Slider Engine
Fully responsive layout, fluid widths, aspect-ratio-aware image delivery
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.
Key Features:
Additional Services
Built-in from day one. No add-ons, no upsell, no licence keys to renew.
Fully responsive layout, fluid widths, aspect-ratio-aware image delivery
Two-entity architecture, manage multiple Sliders, each with its own set of Slides
Fade or slide, choose transition effect per slider
Hyva template, Alpine.js only, zero jQuery, Tailwind-friendly classes
MEQP compliant, passes Adobe's Extension Quality Program
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:
The Panth Banner Slider for Magento 2 covers every requirement of a production hero carousel:
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
<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.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.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.etc/theme-config.json.pub/media/bannerslider/; existing identifiers are skipped. The install action does not answer GET requests.Panth_Core upload extension policy before they are stored.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. |
{{widget type="Panth\BannerSlider\Block\Widget\BannerSlider" identifier="homepage_hero"}}
<block class="Panth\BannerSlider\Block\Widget\BannerSlider" name="my.banner.slider">
<arguments>
<argument name="identifier" xsi:type="string">homepage_hero</argument>
</arguments>
</block>
<?= $block->getLayout()->createBlock(\Panth\BannerSlider\Block\Widget\BannerSlider::class)->setData('identifier', 'homepage_hero')->toHtml() ?>
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.
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).
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.
See CHANGELOG.md.
| 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.
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)hyva-themes/magento2-default-theme when the Hyva template is usedcomposer 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
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":
panth_bannerslider/slider/index)panth_bannerslider/slide/index)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.
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/).
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.
Free and open source under the MIT License. See LICENSE.txt.
Panth_BannerSlider; Composer package: mage2kishan/module-banner-slider; namespace: Panth\BannerSlider.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().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.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.Model\Config\Source\TransitionEffect (fade, slide) and Model\Config\Source\SliderOptions (all sliders).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.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.Panth_BannerSlider::slider ("Banner Slider - Manage Sliders") and Panth_BannerSlider::slide ("Banner Slider - Manage Banners"), under Panth_Core::panth_extensions.panth_bannerslider_slider_listing, panth_bannerslider_slider_form, panth_bannerslider_slide_listing, panth_bannerslider_slide_form.etc/db_schema.xml): panth_banner_slider (unique on identifier + store_id) and panth_banner_slide (indexed on slider_id, is_active, sort_order).Setup/SampleData/*.json with images in Setup/SampleData/images/.| Module Category | Theme & UI |
|---|---|
| Best For | All Sizes |
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.
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.
Yes. A separate Luma template is included with RequireJS-based initialization. No Slick or Owl Carousel dependencies are required.
Yes. Every slide has optional Start Date and End Date fields. Slides automatically appear and disappear based on the configured schedule.
Yes. Each slide has a Store View selector, so you can scope slides to specific stores in multi-store setups.
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.
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.
Yes. The module uses Magento's standard __() translation function, so every user-facing string can be translated via the standard i18n workflow.
Yes. Override the template files in your theme via standard Magento theme fallback (app/design/frontend/<Vendor>/<theme>/Panth_BannerSlider/templates/...).
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.
Talk to Kishan directly: written quote, scope and timeline within 24 hours. No sales call.
Banner Slider for Magento 2