The Home for Magento 2 Excellence

Automated build tests for Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1061 Modules
673 Ready
387 Need Help
Vendors 🏆 Leaderboard
Actively Maintained v0.9.0 OSL-3.0

Loki Admin Components

loki/magento2-admin-components 61

Speeds up the creation of admin grids and forms in Magento 2. Simplifies UI component development for faster admin panel customization.

32,799
Downloads
Below average
17
GitHub Stars
Below average
Today
Last Release
3
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
8 errors , 114 warnings
L1 PHPStan

Release Discipline

Follows SemVer · 100% What is this?

Release history audited up to v0.9.0

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v0.9.0 on Magento 2.4.9
Nov 16, 2026
v0.8.3 on Magento 2.4.9
Oct 25, 2026
v0.8.2 on Magento 2.4.9
Oct 19, 2026
v0.8.0 on Magento 2.4.9
Oct 13, 2026
v0.7.2 on Magento 2.4.9
Aug 9, 2026
v0.7.1 on Magento 2.4.9
Jul 14, 2026

+14 older tests

Share This Module's Status

Loki Admin Components Magento compatibility status badge

README

Loaded from GitHub

Loki_AdminComponents

This Magento 2 module allows for developers to build admin grids and admin forms in the Magento 2 Admin Panel in a faster way. No more ugly UiComponents that nobody understands. Create grids and forms quickly. And gradually add features to them, without getting stuck.

The LokiAdminComponents are based on the Loki Components module which is also used in the LokiCheckout. However, this admin tool shows that the Loki Extension suite can be applied in many more places.

Note that this library makes use of Alpine.js in the Magento Admin Panel. As for CSS, we stick to the native Magento Admin Panel classes instead: Everything looks the same.

Installation

composer require loki/magento2-admin-components
bin/magento module:enable Loki_AdminComponents Loki_Components Loki_CssUtils Loki_Base

Getting started with a grid

First create a module that generates a page in the Admin Panel (etc/module.xml, registration.php, a backend controller action class, perhaps acl.xml and menu.xml).

In your new XML layout file, add the following:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:View/Layout:etc/page_configuration.xsd">
    <update handle="loki_admin_components_grid"/>

    <body>
        <referenceContainer name="content">
            <block
                name="yireo-training.example-admin.grid"
                template="Loki_AdminComponents::grid.phtml">
                <arguments>
                    <argument name="provider" xsi:type="string">
                        Magento\Catalog\Api\ProductRepositoryInterface
                    </argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

And you're done. After refreshing the Magento cache, you now have a product grid.

Refer to the documentation for fine-tuning this grid.

Getting started with a form

Again, first create a module that generates a page in the Admin Panel (etc/module.xml, registration.php, a backend controller action class, perhaps acl.xml and menu.xml).

In your new XML layout file, add the following:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:View/Layout:etc/page_configuration.xsd">
    <update handle="loki_admin_components_form"/>

    <body>
        <referenceContainer name="content">
            <block
                name="yireo-training.example-admin.form"
                template="Loki_AdminComponents::form.phtml">
                <arguments>
                    <argument name="provider" xsi:type="string">
                        Magento\Catalog\Api\ProductRepositoryInterface
                    </argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

And you're done. After refreshing the Magento cache, you now have a basic product form.

Refer to the documentation for fine-tuning this form.

Permissions (ACL)

Every AJAX request of a grid or form requires an admin login. Use the following block arguments to require extra ACL resources:

  • acl_resource: Required for every request of the component (viewing, searching, saving);
  • save_acl_resource: Required for the form actions save and duplicate and for inline editing in a grid;
  • delete_acl_resource: Required for the form action delete;

Buttons of actions that the current admin user is not allowed to perform (like Delete) are hidden. Mass actions and cell actions point to your own controllers, so protect those via their ADMIN_RESOURCE.

<argument name="acl_resource" xsi:type="string">Vendor_Module::items</argument>
<argument name="save_acl_resource" xsi:type="string">Vendor_Module::items_save</argument>
<argument name="delete_acl_resource" xsi:type="string">Vendor_Module::items_delete</argument>

Examples

As a demo, you could opt to install the following examples:

Screenshot of YireoTraining_ExampleLokiAdminProducts

Features

Grid features

  • Autodetection of columns
  • Search
  • Pagination
  • Sorting columns
  • Custom cell templates
  • Inline editing
  • Filters
  • Mass Actions
  • Custom cell templates
  • ... (more docs coming soon)

Grid provider handlers

  • repository
  • collection
  • array

Form features

  • Autodetection of columns
  • Field-types (select, input, number, datetime, etc) with option to configure more
  • Form actions (*Back, Save and Close, Save and Continue, Delete, etc)
  • ... (more docs coming soon)

Documentation

See https://loki-extensions.com/docs/admin-components

Todo

  • Extension Attributes
  • Filesystem navigation
  • Tiles instead of grid layout
  • Delete add confirmation
  • Add custom SearchCriteriaBuilder via repository addons
  • Switch field for enabled/disabled column within grid
  • Export selected to CSV, JSON, XSLX

Current status

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.