Skip to content

Repository files navigation

LokiTheme_LumaComponents

Magento version PHP version License Latest Version

Replace Magento Luma's legacy JavaScript stack with lightweight, CSP-friendly JavaScript and Alpine.js components.

Links

Installation

composer require loki-theme/magento2-luma-components
bin/magento module:enable LokiTheme_LumaComponents

What this is

This module removes legacy Luma JavaScript (RequireJS, Knockout.js, jQuery, jQuery UI) and replaces it with custom JavaScript where needed. The following variations for this rewrite exist - taking in mind that this module tries to make as little template override as possible:

  • No JavaScript, just plain HTML and CSS;
  • Simple JavaScript functions;
  • Alpine.js components (with or without custom template);

Included components

Component Replacement
Messages ✅ Vanilla JS
Cookie Notice ✅ Alpine.js
Desktop Navigation ✅ Alpine.js
Mobile Navigation ✅ Alpine.js
Customer Top Links ✅ Alpine.js
Mini Cart ✅ Alpine.js
Newsletter Subscribe ✅ Vanilla JS
Add to Cart (PDP) ✅ Vanilla JS
Add to Cart (PLP) ✅ Vanilla JS
Wishlist / Compare ✅ Vanilla JS
Product Tabs ✅ Alpine.js
Currency Switcher ✅ Alpine.js

The goal is to replace legacy JavaScript with the smallest possible number of template overrides.

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation

About

Magento 2 module to replace the legacy Luma JavaScript with modern-day JS

Topics

Resources

Security policy

Stars

8 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages