To build new Loki FieldComponents (or use existing ones), the Loki_FieldComponents
module and its dependencies need to be installed. Here are the steps.
composer require loki/magento2-field-components
bin/magento module:enable Loki_FieldComponents Loki_Components Loki_Base Loki_CssUtils
As you can see, the Loki_FieldComponents
module has a dependency with Loki_Components
, Loki_Base
and Loki_CssUtils
which might be useful as well, outside of the scope of Loki Field Components (as in: single field Loki Components).
From this point onwards, you can build your own Loki Field Components.
We also have some example components available that show the functionality of Loki Field Components:
composer require yireo-training/magento2-example-loki-field-components
bin/magento module:enable YireoTraining_ExampleLokiFieldComponents
This extends the regular YireoTraining_ExampleLokiComponents
module (used to demo Loki_Components
) with a new page with all kinds of fields: Text, textarea, select, multiselect, radio, switch, etcetera.