SlideShare a Scribd company logo
UI Components
Sergey Ivashchenko
Bookmarks
Pagination
Grid
Filters
Massaction
FilterSearch
All these are UI Components
Listing
Form
Filter
Pagination
MassAction
TreeMassAction
Column
UI-select
Multiselect
Inline Edit
Bookmark
Resize Sticky Header
Export
Uploader
UI Components dependencies
Magento Framework
(Defines interfaces, introduces uiComponent layout item)
MagentoUi module
(Declares predefined UI Components and infrastructure)
MagentoCatalog MagentoBraintree
Placeholder for your
module
Page Layout
UI Component
Layout
Preprocessing
and converting
to json
(php)
Rendering and
interaction
knockout.js
Process of UI Component rendering
<uiComponent name="sales_order_grid"/>
Entrypoint from layout
<listing>
<dataSource>
<argument name="dataProvider">
<argument
name="class">TheDataProvider</argument>
</argument>
</dataSource>
<filters>...</filters>
<columns>...</columns>
<exportButton/>
…
</listing>
UI Component layout
Json
{"components": {
"sales_order_grid": {
"config": {},
"children": {
"filters": {
"config": {},
...
Simple UI Component structure
Configuration
(definition.xml +
instance)
PHP class to
process and
prepare
configuration on
backend
HTML template
of component
JS component to
handle frontend
processing and
actions
Example - Export Button
Configuration (definition.xml)
<exportButton class="MagentoUiComponentExportButton">
<argument name="data">
<item name="config">
<item name="component">Magento_Ui/js/grid/export</item>
<item name="template">ui/grid/exportButton</item>
<item name="displayArea">dataGridActions</item>
<item name="options">
<item name="csv">
<item name="value">csv</item>
<item name="label">CSV</item>
<item name="url">mui/export/gridToCsv</item>
</item>
</item>
</item>
</argument>
</exportButton>
Preparation (php component)
class ExportButton extends AbstractComponent
{
public function prepare()
{
foreach ($this->getData('config')['options'] as $option) {
$option['url'] = $this->urlBuilder->getUrl($option['url']);
}
parent::prepare();
}
}
Template (html)
<div>
<!-- ko foreach: options -->
<span data-bind="text: label"></span>
<input type="radio" data-bind="checkedValue: value, checked: $parent.checked"/>
<!-- /ko -->
<button data-bind="click: applyOption">Export</button>
</div>
Behavior (js component)
define([
'uiElement'
], function (Element) {
return Element.extend({
applyOption: function () {
location.href = this.buildUrl(this.getSelectedOption());
}
});
});
Extensibility
Configuration
definition.xml
UI Component layout
Page layout
Data
di.xml
UI Component layout
plugins
Conclusions
Easy to use and adjust
Lots of levels for non-conflict extensibility
Keeping visualization and interaction together as granular
components
Require just a bit of research to get started
Thank you!
sivaschenko.com

More Related Content

PDF
Practice makes perfect spanish conversation, premium second edition
PDF
Automated tests types on Magento 2 example
PDF
Simple flat ui css accordion
PPTX
Responsive UI using CSS Media Query
PPTX
Madison PHP - Getting Started with Magento 2
PDF
Le Wagon - UI and Design Crash Course
PDF
Le Wagon - UI components design
PDF
Le Wagon's Product Design Sprint
Practice makes perfect spanish conversation, premium second edition
Automated tests types on Magento 2 example
Simple flat ui css accordion
Responsive UI using CSS Media Query
Madison PHP - Getting Started with Magento 2
Le Wagon - UI and Design Crash Course
Le Wagon - UI components design
Le Wagon's Product Design Sprint

Viewers also liked (8)

PDF
Le Wagon - 2h Landing
PDF
UI + Frameworks
PDF
Le Wagon - Javascript for Beginners
PDF
Modern UI Development With Node.js
PDF
Web Components and Modular CSS
PPTX
Html,CSS & UI/UX design
PDF
reveal.js 3.0.0
PDF
UX Design + UI Design: Injecting a brand persona!
Le Wagon - 2h Landing
UI + Frameworks
Le Wagon - Javascript for Beginners
Modern UI Development With Node.js
Web Components and Modular CSS
Html,CSS & UI/UX design
reveal.js 3.0.0
UX Design + UI Design: Injecting a brand persona!
Ad

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Spectroscopy.pptx food analysis technology
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
Mobile App Security Testing_ A Comprehensive Guide.pdf
Network Security Unit 5.pdf for BCA BBA.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development
“AI and Expert System Decision Support & Business Intelligence Systems”
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
NewMind AI Weekly Chronicles - August'25 Week I
Spectroscopy.pptx food analysis technology
sap open course for s4hana steps from ECC to s4
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Unlocking AI with Model Context Protocol (MCP)
Ad

Introduction to UI Components in Magento 2