123b3eb3cSopenharmony_ci# JS UI Framework<a name="EN-US_TOPIC_0000001076213364"></a> 223b3eb3cSopenharmony_ci 323b3eb3cSopenharmony_ci- [Introduction](#section15701932113019) 423b3eb3cSopenharmony_ci- [Directory Structure](#section1791423143211) 523b3eb3cSopenharmony_ci- [When to Use](#section171384529150) 623b3eb3cSopenharmony_ci- [Available Components](#section271831717166) 723b3eb3cSopenharmony_ci- [Repositories Involved](#section1447164910172) 823b3eb3cSopenharmony_ci 923b3eb3cSopenharmony_ci## Introduction<a name="section15701932113019"></a> 1023b3eb3cSopenharmony_ci 1123b3eb3cSopenharmony_ciThe OpenHarmony JS UI framework provides basic, container, and canvas UI components and standard CSS animation capabilities. It supports the web-development-like programming paradigm. 1223b3eb3cSopenharmony_ci 1323b3eb3cSopenharmony_ci- **Web-development-like paradigm** 1423b3eb3cSopenharmony_ci 1523b3eb3cSopenharmony_ci The JS UI framework supports languages that are similar to those for web development, such as HTML and CSS. You can use them to describe the page layout and style, and use JavaScript \(conforming to the ECMAScript specification\) for page behavior. This paradigm allows you to avoid code for UI state switching. The view configuration information is intuitive. 1623b3eb3cSopenharmony_ci 1723b3eb3cSopenharmony_ci 1823b3eb3cSopenharmony_ci**Figure 1** Framework architecture<a name="fig2606133765017"></a> 1923b3eb3cSopenharmony_ci 2023b3eb3cSopenharmony_ci 2123b3eb3cSopenharmony_ciThe JS UI framework consists of the application, framework, engine, and porting layers. 2223b3eb3cSopenharmony_ci 2323b3eb3cSopenharmony_ci- **Application** 2423b3eb3cSopenharmony_ci 2523b3eb3cSopenharmony_ci Contains apps with Feature Abilities \(FAs\) developed with the JS UI framework. The FA app in this document refers to the app with FAs developed using JavaScript. 2623b3eb3cSopenharmony_ci 2723b3eb3cSopenharmony_ci- **Framework** 2823b3eb3cSopenharmony_ci 2923b3eb3cSopenharmony_ci Parses UI pages and provides the Model-View-ViewModel \(MVVM\), page routing, custom components and more for front end development. 3023b3eb3cSopenharmony_ci 3123b3eb3cSopenharmony_ci- **Engine** 3223b3eb3cSopenharmony_ci 3323b3eb3cSopenharmony_ci Accomplishes animation parsing, Document Object Model \(DOM\) building, layout computing, rendering command building and drawing, and event management. 3423b3eb3cSopenharmony_ci 3523b3eb3cSopenharmony_ci- **Porting Layer** 3623b3eb3cSopenharmony_ci 3723b3eb3cSopenharmony_ci Abstracts the platform layer to provide abstract interfaces to connect to the platform. For example, event interconnection, rendering pipeline interconnection, and lifecycle interconnection. 3823b3eb3cSopenharmony_ci 3923b3eb3cSopenharmony_ci 4023b3eb3cSopenharmony_ci## Directory Structure<a name="section1791423143211"></a> 4123b3eb3cSopenharmony_ci 4223b3eb3cSopenharmony_ciThe source code of the framework is stored in **/foundation/arkui/ace\_engine**. The following shows the directory structure. 4323b3eb3cSopenharmony_ci 4423b3eb3cSopenharmony_ci``` 4523b3eb3cSopenharmony_ci/foundation/arkui/ace_engine 4623b3eb3cSopenharmony_ci├── adapter # Platform adaptation code 4723b3eb3cSopenharmony_ci│ ├── common 4823b3eb3cSopenharmony_ci│ └── ohos 4923b3eb3cSopenharmony_ci├── frameworks # Framework code 5023b3eb3cSopenharmony_ci│ ├── base # Basic libraries 5123b3eb3cSopenharmony_ci│ ├── bridge # Bridging layer for frontend and backend components 5223b3eb3cSopenharmony_ci│ └── core # Core components 5323b3eb3cSopenharmony_ci``` 5423b3eb3cSopenharmony_ci 5523b3eb3cSopenharmony_ci## When to Use<a name="section171384529150"></a> 5623b3eb3cSopenharmony_ci 5723b3eb3cSopenharmony_ciJS UI framework provides various UI components with rich functionalities and style definitions. You can use and reuse any component anywhere as needed. You can customize new components by combining existing ones to simplify development. 5823b3eb3cSopenharmony_ci 5923b3eb3cSopenharmony_ci## Available Components<a name="section271831717166"></a> 6023b3eb3cSopenharmony_ci 6123b3eb3cSopenharmony_ci**Table 1** Components provided by the framework 6223b3eb3cSopenharmony_ci 6323b3eb3cSopenharmony_ci<a name="table2347172925617"></a> 6423b3eb3cSopenharmony_ci<table><thead align="left"><tr id="row5347429155610"><th class="cellrowborder" valign="top" width="28.64%" id="mcps1.2.3.1.1"><p id="p1347102910567"><a name="p1347102910567"></a><a name="p1347102910567"></a>Type</p> 6523b3eb3cSopenharmony_ci</th> 6623b3eb3cSopenharmony_ci<th class="cellrowborder" valign="top" width="71.36%" id="mcps1.2.3.1.2"><p id="p83475294565"><a name="p83475294565"></a><a name="p83475294565"></a>Components</p> 6723b3eb3cSopenharmony_ci</th> 6823b3eb3cSopenharmony_ci</tr> 6923b3eb3cSopenharmony_ci</thead> 7023b3eb3cSopenharmony_ci<tbody><tr id="row15347122918562"><td class="cellrowborder" valign="top" width="28.64%" headers="mcps1.2.3.1.1 "><p id="p679795614335"><a name="p679795614335"></a><a name="p679795614335"></a>Basic</p> 7123b3eb3cSopenharmony_ci</td> 7223b3eb3cSopenharmony_ci<td class="cellrowborder" valign="top" width="71.36%" headers="mcps1.2.3.1.2 "><p id="p88813982011"><a name="p88813982011"></a><a name="p88813982011"></a>button, text, input, label, image, progress, rating, span, marquee, image-animator, divider, menu, chart, option, picker, picker-view, piece, qrcode, select, slider, switch, toolbar, toolbar-item, toggle</p> 7323b3eb3cSopenharmony_ci</td> 7423b3eb3cSopenharmony_ci</tr> 7523b3eb3cSopenharmony_ci<tr id="row1973535793115"><td class="cellrowborder" valign="top" width="28.64%" headers="mcps1.2.3.1.1 "><p id="p8735195713313"><a name="p8735195713313"></a><a name="p8735195713313"></a>Container</p> 7623b3eb3cSopenharmony_ci</td> 7723b3eb3cSopenharmony_ci<td class="cellrowborder" valign="top" width="71.36%" headers="mcps1.2.3.1.2 "><p id="p1268024618208"><a name="p1268024618208"></a><a name="p1268024618208"></a>div, list, list-item, list-item-group, stack, swiper, tabs, tab-bar, tab-content, refresh, dialog, badge, panel, popup, stepper, stepper-item</p> 7823b3eb3cSopenharmony_ci</td> 7923b3eb3cSopenharmony_ci</tr> 8023b3eb3cSopenharmony_ci<tr id="row1792218915320"><td class="cellrowborder" valign="top" width="28.64%" headers="mcps1.2.3.1.1 "><p id="p692289163220"><a name="p692289163220"></a><a name="p692289163220"></a>Canvas</p> 8123b3eb3cSopenharmony_ci</td> 8223b3eb3cSopenharmony_ci<td class="cellrowborder" valign="top" width="71.36%" headers="mcps1.2.3.1.2 "><p id="p199228910327"><a name="p199228910327"></a><a name="p199228910327"></a>canvas</p> 8323b3eb3cSopenharmony_ci</td> 8423b3eb3cSopenharmony_ci</tr> 8523b3eb3cSopenharmony_ci<tr id="row837615526208"><td class="cellrowborder" valign="top" width="28.64%" headers="mcps1.2.3.1.1 "><p id="p4377752152016"><a name="p4377752152016"></a><a name="p4377752152016"></a>Grid</p> 8623b3eb3cSopenharmony_ci</td> 8723b3eb3cSopenharmony_ci<td class="cellrowborder" valign="top" width="71.36%" headers="mcps1.2.3.1.2 "><p id="p17377185222019"><a name="p17377185222019"></a><a name="p17377185222019"></a>grid-container, grid-row, grid-col</p> 8823b3eb3cSopenharmony_ci</td> 8923b3eb3cSopenharmony_ci</tr> 9023b3eb3cSopenharmony_ci</tbody> 9123b3eb3cSopenharmony_ci</table> 9223b3eb3cSopenharmony_ci 9323b3eb3cSopenharmony_ci## Repositories Involved<a name="section1447164910172"></a> 9423b3eb3cSopenharmony_ci 9523b3eb3cSopenharmony_ciJS UI framework 9623b3eb3cSopenharmony_ci 9723b3eb3cSopenharmony_ci**arkui\_ace\_engine** 9823b3eb3cSopenharmony_ci 9923b3eb3cSopenharmony_ciace\_engine\_lite 10023b3eb3cSopenharmony_ci 10123b3eb3cSopenharmony_ciarkui\_napi 10223b3eb3cSopenharmony_ci 103