SlideShare una empresa de Scribd logo
1 de 11
Overview of UI components - Magento 2 Developer Documentation
Visit Us: www.eglobeits.com
Magento 2 UI Components
Basic Components
● Listing component
● Form component
1. Breadcrumbs 2. Pagination
3. Buttons 4. Popups
5. Drop-downs 6. Ratings
7. Forms 8. Sections
9. Icons 10. layout
11. Tabs and accordions 12. Tables
13. Loaders 14. Tooltips
15.Messages 16. Actions-toolbar
Magento 2 UI Library
Magento UI Library
Magento UI library is located under `/lib/web/` folder
➢ Lib
➢ Web
➢ css
➢ Fonts
➢ Images
➢ Jquery
UI library provides the ability to customize and reuse the user interface elements and properties.
Liberation Scans
● simple and flexible UI rendering.
● standard module and can be found under MagentoUI namespace.
● providing/supporting interactions of JavaScript components and server
● Vendor
● Magento
● Module-ui
–View
●Base
●ui_component
●Etc
●Definition.xml (UI components base declaration)
●Templates
●Container
●Export
●Form
●Default.xhtml (<uiComponent/> rendering html)
●Listing
●Default.xhtml
●Web
●Js
●Templates
●Form
●Element
●Button.html
●Input.html
The actual rendering of the interface element in the browser is handled by KnockoutJS.
Definition.xml
<form class="MagentoUiComponentForm">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/form</item>
</item>
<item name="template" xsi:type="string">templates/form/default</item>
</argument>
</form>
Magento 1 -Adding Product Editing form to a Page
<adminhtml_catalog_product_new>
<update handle="editor"/>
<reference name="content">
<block type="adminhtml/catalog_product_edit" name="product_edit"></block>
</reference>
<reference name="left">
<block type="adminhtml/catalog_product_edit_tabs" name="product_tabs"></block>
</reference>
<reference name="js">
<block type="adminhtml/catalog_product_edit_js" template="catalog/product/js.phtml"
name="catalog_product_js"></block>
<block type="core/template" template="catalog/wysiwyg/js.phtml"/>
</reference>
</adminhtml_catalog_product_new>
<editor>
<reference name="head">
<action method="setCanLoadExtJs"><flag>1</flag></action>
<action method="addJs"><script>mage/adminhtml/variables.js</script></action>
<action method="addJs"><script>mage/adminhtml/wysiwyg/widget.js</script></action>
<action method="addJs"><script>lib/flex.js</script></action>
<action method="addJs"><script>lib/FABridge.js</script></action>
<action method="addJs"><script>mage/adminhtml/flexuploader.js</script></action>
<action method="addJs"><script>mage/adminhtml/browser.js</script></action>
<action method="addJs"><script>prototype/window.js</script></action>
<action method="addItem">
<type>js_css</type><name>prototype/windows/themes/default.css</name>
</action>
<action method="addCss">
<name>lib/prototype/windows/themes/magento.css</name>
</action>
</reference>
</editor>
Magento 2 -adding product editing form to a page
<uiComponent name="product_form"/>
Add New Tab in product edit page in Magento 2 admin
Code / [namespace] / [your module] / View/ui_components / product_form.xml
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="product.packages">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Product Package</item>
<item name="sortOrder" xsi:type="number">200</item>
</item>
</argument>
<field name="customFieldName">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="prefixName" xsi:type="string">customFieldName</item>
<item name="label" xsi:type="string" translate="true">Package Label</item>
<item name="component" xsi:type="string">Magento_Catalog/js/form/element/input</item>
<item name="template" xsi:type="string">Magento_Catalog/form/element/input</item>
</item>
</argument>
</field>
</fieldset>
</form>
Default.xhtml
<div data-role="spinner" data-component="{{getName()}}.areas" class="admin__data-grid-loading-mask">
<div class="spinner">
<span/><span/><span/><span/><span/><span/><span/><span/>
</div>
</div>
<div data-bind="scope: '{{getName()}}.areas'" class="entry-edit form-inline">
<!-- ko template: getTemplate() --><!-- /ko -->
</div>
Thank You

Más contenido relacionado

La actualidad más candente

Windows 8 Camp Montreal - 2012-04-10 - Integrating the Windows 8 experience w...
Windows 8 Camp Montreal - 2012-04-10 - Integrating the Windows 8 experience w...Windows 8 Camp Montreal - 2012-04-10 - Integrating the Windows 8 experience w...
Windows 8 Camp Montreal - 2012-04-10 - Integrating the Windows 8 experience w...
Frédéric Harper
 
How to customize views & menues of OpenERP online in a sustainable way. Frede...
How to customize views & menues of OpenERP online in a sustainable way. Frede...How to customize views & menues of OpenERP online in a sustainable way. Frede...
How to customize views & menues of OpenERP online in a sustainable way. Frede...
Odoo
 

La actualidad más candente (8)

Odoo - Business intelligence: Develop cube views for your own objects
Odoo - Business intelligence: Develop cube views for your own objectsOdoo - Business intelligence: Develop cube views for your own objects
Odoo - Business intelligence: Develop cube views for your own objects
 
Why NextCMS: Layout Editor
Why NextCMS: Layout EditorWhy NextCMS: Layout Editor
Why NextCMS: Layout Editor
 
Nuxeo World Session: Layouts and Content Views
Nuxeo World Session: Layouts and Content ViewsNuxeo World Session: Layouts and Content Views
Nuxeo World Session: Layouts and Content Views
 
Windows 8 Camp Montreal - 2012-04-10 - Integrating the Windows 8 experience w...
Windows 8 Camp Montreal - 2012-04-10 - Integrating the Windows 8 experience w...Windows 8 Camp Montreal - 2012-04-10 - Integrating the Windows 8 experience w...
Windows 8 Camp Montreal - 2012-04-10 - Integrating the Windows 8 experience w...
 
01 08 - graphical user interface - layouts
01  08 - graphical user interface - layouts01  08 - graphical user interface - layouts
01 08 - graphical user interface - layouts
 
How to customize views & menues of OpenERP online in a sustainable way. Frede...
How to customize views & menues of OpenERP online in a sustainable way. Frede...How to customize views & menues of OpenERP online in a sustainable way. Frede...
How to customize views & menues of OpenERP online in a sustainable way. Frede...
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Geb qa fest2017
Geb qa fest2017Geb qa fest2017
Geb qa fest2017
 

Destacado

How to create a magento controller in magento extension
How to create a magento controller in magento extensionHow to create a magento controller in magento extension
How to create a magento controller in magento extension
Hendy Irawan
 

Destacado (9)

Why magento is the best e commerce platform?
Why magento is the best e commerce platform?Why magento is the best e commerce platform?
Why magento is the best e commerce platform?
 
Magento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kcMagento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kc
 
Ves Beat – magento 2 templates
Ves Beat – magento 2 templatesVes Beat – magento 2 templates
Ves Beat – magento 2 templates
 
How to create a magento controller in magento extension
How to create a magento controller in magento extensionHow to create a magento controller in magento extension
How to create a magento controller in magento extension
 
Front End Development in Magento
Front End Development in MagentoFront End Development in Magento
Front End Development in Magento
 
Magento Presentation Layer
Magento Presentation LayerMagento Presentation Layer
Magento Presentation Layer
 
How to create theme in Magento 2 - Part 2
How to create theme in Magento 2 - Part 2How to create theme in Magento 2 - Part 2
How to create theme in Magento 2 - Part 2
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
 
How To Create Theme in Magento 2 - Part 1
How To Create Theme in Magento 2 - Part 1How To Create Theme in Magento 2 - Part 1
How To Create Theme in Magento 2 - Part 1
 

Similar a Magento 2 UI Components Overview

GUI_part_1.pptx
GUI_part_1.pptxGUI_part_1.pptx
GUI_part_1.pptx
Parasuraman43
 

Similar a Magento 2 UI Components Overview (20)

JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!
 
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
 
Jab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealedJab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealed
 
Telerik Kendo UI Overview
Telerik Kendo UI OverviewTelerik Kendo UI Overview
Telerik Kendo UI Overview
 
Java server faces
Java server facesJava server faces
Java server faces
 
RichFaces CDK: Rapid JSF Component Development
RichFaces CDK: Rapid JSF Component DevelopmentRichFaces CDK: Rapid JSF Component Development
RichFaces CDK: Rapid JSF Component Development
 
React for Non Techies
React for Non TechiesReact for Non Techies
React for Non Techies
 
React for non techies
React for non techiesReact for non techies
React for non techies
 
GUI_part_1.pptx
GUI_part_1.pptxGUI_part_1.pptx
GUI_part_1.pptx
 
[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)
[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)
[KOR][E-Kor-Seminar 2014][2/8] Webkit EFL (Ryuan)
 
React for non techies
React for non techiesReact for non techies
React for non techies
 
Web component
Web componentWeb component
Web component
 
Web browser architecture
Web browser architectureWeb browser architecture
Web browser architecture
 
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and PatternsFRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
 
WebComponents .pptx
WebComponents .pptxWebComponents .pptx
WebComponents .pptx
 
20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native
 
jQuery programming with visual web part
jQuery programming with visual web partjQuery programming with visual web part
jQuery programming with visual web part
 
Spec by Role
Spec by RoleSpec by Role
Spec by Role
 
Comparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsComparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAs
 
Web components - An Introduction
Web components - An IntroductionWeb components - An Introduction
Web components - An Introduction
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Magento 2 UI Components Overview

  • 1. Overview of UI components - Magento 2 Developer Documentation Visit Us: www.eglobeits.com
  • 2. Magento 2 UI Components Basic Components ● Listing component ● Form component 1. Breadcrumbs 2. Pagination 3. Buttons 4. Popups 5. Drop-downs 6. Ratings 7. Forms 8. Sections 9. Icons 10. layout 11. Tabs and accordions 12. Tables 13. Loaders 14. Tooltips 15.Messages 16. Actions-toolbar
  • 3. Magento 2 UI Library Magento UI Library Magento UI library is located under `/lib/web/` folder ➢ Lib ➢ Web ➢ css ➢ Fonts ➢ Images ➢ Jquery UI library provides the ability to customize and reuse the user interface elements and properties.
  • 4. Liberation Scans ● simple and flexible UI rendering. ● standard module and can be found under MagentoUI namespace. ● providing/supporting interactions of JavaScript components and server ● Vendor ● Magento ● Module-ui –View ●Base ●ui_component ●Etc ●Definition.xml (UI components base declaration) ●Templates ●Container ●Export ●Form ●Default.xhtml (<uiComponent/> rendering html) ●Listing ●Default.xhtml ●Web ●Js ●Templates ●Form ●Element ●Button.html ●Input.html The actual rendering of the interface element in the browser is handled by KnockoutJS.
  • 5. Definition.xml <form class="MagentoUiComponentForm"> <argument name="data" xsi:type="array"> <item name="js_config" xsi:type="array"> <item name="component" xsi:type="string">Magento_Ui/js/form/form</item> </item> <item name="template" xsi:type="string">templates/form/default</item> </argument> </form>
  • 6. Magento 1 -Adding Product Editing form to a Page <adminhtml_catalog_product_new> <update handle="editor"/> <reference name="content"> <block type="adminhtml/catalog_product_edit" name="product_edit"></block> </reference> <reference name="left"> <block type="adminhtml/catalog_product_edit_tabs" name="product_tabs"></block> </reference> <reference name="js"> <block type="adminhtml/catalog_product_edit_js" template="catalog/product/js.phtml" name="catalog_product_js"></block> <block type="core/template" template="catalog/wysiwyg/js.phtml"/> </reference> </adminhtml_catalog_product_new>
  • 7. <editor> <reference name="head"> <action method="setCanLoadExtJs"><flag>1</flag></action> <action method="addJs"><script>mage/adminhtml/variables.js</script></action> <action method="addJs"><script>mage/adminhtml/wysiwyg/widget.js</script></action> <action method="addJs"><script>lib/flex.js</script></action> <action method="addJs"><script>lib/FABridge.js</script></action> <action method="addJs"><script>mage/adminhtml/flexuploader.js</script></action> <action method="addJs"><script>mage/adminhtml/browser.js</script></action> <action method="addJs"><script>prototype/window.js</script></action> <action method="addItem"> <type>js_css</type><name>prototype/windows/themes/default.css</name> </action> <action method="addCss"> <name>lib/prototype/windows/themes/magento.css</name> </action> </reference> </editor> Magento 2 -adding product editing form to a page <uiComponent name="product_form"/>
  • 8. Add New Tab in product edit page in Magento 2 admin Code / [namespace] / [your module] / View/ui_components / product_form.xml <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> <fieldset name="product.packages"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="label" xsi:type="string" translate="true">Product Package</item> <item name="sortOrder" xsi:type="number">200</item> </item> </argument>
  • 9. <field name="customFieldName"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="dataType" xsi:type="string">text</item> <item name="formElement" xsi:type="string">input</item> <item name="prefixName" xsi:type="string">customFieldName</item> <item name="label" xsi:type="string" translate="true">Package Label</item> <item name="component" xsi:type="string">Magento_Catalog/js/form/element/input</item> <item name="template" xsi:type="string">Magento_Catalog/form/element/input</item> </item> </argument> </field> </fieldset> </form>
  • 10. Default.xhtml <div data-role="spinner" data-component="{{getName()}}.areas" class="admin__data-grid-loading-mask"> <div class="spinner"> <span/><span/><span/><span/><span/><span/><span/><span/> </div> </div> <div data-bind="scope: '{{getName()}}.areas'" class="entry-edit form-inline"> <!-- ko template: getTemplate() --><!-- /ko --> </div>