YireoTraining_ExampleLokiComponents

Examples
PHP 8.1 - 8.4
Magento 2.4.7 | 2.4.8
CSP Yes
Integration Tests 1
Latest Release 0.0.12

Example module to demonstrate various usecases of Loki Components, as being used in the Yireo LokiCheckout extension suite for Magento 2.

You can use this module without the requirement of having the LokiCheckout. This module only depends upon the free Loki_Components module.

Installation

Install this package via composer (assuming you have setup the composer.yireo.com repository correctly already):

composer require yireo-training/magento2-example-loki-components

Next, enable this module:

bin/magento module:enable YireoTraining_ExampleLokiComponents

Support

For getting support, create an Issue under the following project URL:

https://github.com/yireo-training/YireoTraining_ExampleLokiComponents

Loki Components

The following LokiComponents are created or references in this module:

example-loki-components.random example-loki-components.modal.modal1 example-loki-components.modal.modal2 example-loki-components.modal.modal3 example-loki-components.modal.modal4 example-loki-components.like example-loki-components.switcher example-loki-components.comments-add example-loki-components.comments-listing example-loki-components.comments-counter example-loki-components.notification example-loki-components.exceptions
Module Dependencies

The following dependencies are declared in the module its `etc/module.xml` file:

Loki_Components Magento_Customer Magento_Store
Composer details
Magento module name
YireoTraining_ExampleLokiComponents
Composer name
yireo-training/magento2-example-loki-components
Composer version
0.0.12
Default branch
master
Requirements
loki/magento2-components: ^2.0
magento/framework: ^103.0
magento/module-customer: ^103.0
magento/module-store: ^101.1
Releases
dev-master#e60d3c6c1d27423b6b67acad166543c5955cafa4 20 October 2025
0.0.16 20 October 2025
0.0.15 20 October 2025
0.0.14 20 October 2025
0.0.13 20 October 2025
0.0.12 20 October 2025
0.0.11 20 October 2025
0.0.10 20 October 2025
0.0.9 20 October 2025
0.0.8 20 October 2025
0.0.7 20 October 2025
0.0.6 20 October 2025
0.0.5 20 October 2025
0.0.4 20 October 2025
0.0.3 20 October 2025
0.0.2 20 October 2025
0.0.1 20 October 2025
Changelog

[0.0.12] - 02 September 2025

Fixed

  • Add CI files

[0.0.11] - 21 August 2025

Fixed

  • Fix duplicate import
  • Fix escaping of SVGs
  • Replace LokiComponentsUtilBlockCssClass with LokiCssUtilsUtilCssClass
  • Fix all CSS todos
  • Declare used PHP namespaces
  • Fix newlines after comments
  • Declare used PHP namespaces
  • Add escaping of template code
  • Formatting
  • Fix newlines after comments
  • Declare used PHP namespaces
  • Add escaping of template code
  • Document latest version of template
  • Add missing strict_types declaration

[0.0.10] - 30 July 2025

Fixed

  • Add counter for exceptions example

[0.0.9] - 28 July 2025

Fixed

  • Set page layout of demo pages to 1column

[0.0.8] - 24 July 2025

Fixed

  • Fix exception example

[0.0.7] - 22 July 2025

Fixed

  • Complete rewrite of namespacing

[0.0.6] - 25 April 2025

Fixed

  • Remove x-model because of CSP compliance

[0.0.5] - 16 April 2025

Fixed

  • Chop up modal into regular component, Loki Component and component partial
  • Complete modal example

[0.0.4] - 09 April 2025

Fixed

  • Additional styling via Tailwind
  • Add keywords to composer.json
  • Housekeeping

[0.0.3] - 11 March 2025

Fixed

  • POF for LokiMapComponents
  • Huge refactoring to move logic into new LokiFieldComponents
  • Add configurable listing of links
  • Rename URL
  • Update docs

[0.0.2] - 22 February 2025

  • Add README
  • Add TODO file for site building
  • Refactor LocalMessageRegistry methods
  • Add links to Luma footer
  • Fix old call
  • Rename numeric to number because numeric is reserved
  • Fix die statement
  • Major rewrite of context
  • Move isAjax to single ViewModel
  • Rewrite repository and viewModel instantiation
  • Rename repository abstract methods
  • Update composer.json

[0.0.1] - 26 December 2024

  • First release

[dev] - 24 December 2024

  • Initial proof-of-concept

Last modified: September 1, 2025