1# Introduction to Form Kit 2<!--Kit: Form Kit--> 3<!--Subsystem: Ability--> 4<!--Owner: @cx983299475--> 5<!--Designer: @xueyulong--> 6<!--Tester: @chenmingze--> 7<!--Adviser: @Brilliantry_Rui--> 8Form Kit provides a development framework and APIs for embedding application information into system entries like the home screen<!--RP3--><!--RP3End-->. It can extract key user information or frequent operations into service widgets (referred to as "widgets"), which can be added to the home screen<!--RP3--><!--RP3End--> for easy access to information and direct service interactions. 9 10## Scenarios for Widget Usage 11- Supported devices: smartphones, tablets, PCs/2-in-1 devices, smart TVs, smart watches, and head units. This kit is not supported on lite wearables. 12- Supported types: Both applications and atomic services can develop widgets. 13- Supported positions: Users can add widgets to the home screen<!--RP3--><!--RP3End-->. Widgets cannot be embedded in common applications. 14- To use a widget: 15 161. Touch and hold an application icon on the home screen to display the shortcut menu. 172. Tap <!--Del-->**Service**<!--DelEnd-->**widget**, go to the widget management page, and preview the widget. 183. Touch the **Add to home** button. The widget is then added to the home screen. 19 20**Figure 1** Typical procedure of using a widget 21<!--RP2--> 22 23<!--RP2End--> 24 25## Widget Architecture 26**Figure 2** Widget architecture 27 28 29**Fundamental Concepts in Widget Usage Scenarios** 30- Widget host: an application that displays the widget content and controls the widget location. It enables direct user interactions and manages widget addition, deletion, and display. An example is the home screen in the preceding figure. 31- Widget provider: an application or atomic service that provides the widget. It is responsible for implementing the widget features, including designing the UI, updating data, and handling click interactions. 32- Widget manager: a system service within the operating system that manages all widget information on the device. As a bridge between widget providers and hosts, it offers capabilities such as querying, adding, and deleting widget information to the hosts, and provides notifications like widget addition, deletion, refresh, and click events to the providers. 33 34 35## Features 36- Information display: Key information from applications or atomic services is displayed on the home screen as widgets. The information can be updated periodically so that users can view relevant information at any time. 37 38- Instant service access: Users can perform quick actions by touching buttons within the widget and can also navigate to the corresponding functional pages of the application or atomic service, achieving seamless one-step service access. 39 40 41## Development Modes 42 43**Model Selection** 44 45The system currently supports two application development models: stage and FA. Consequently, Form Kit accommodates both models for widget development, with a preference for the stage model. 46 47**UI Development Paradigm Selection** 48- The stage model allows for two UI development paradigms for widgets: ArkTS-based declarative development paradigm (for developing ArkTS widgets) and web-like development paradigm (for developing JS widgets). 49- The FA model supports only the development of JS widgets with the web-like development paradigm. 50 51ArkTS widgets and JS widgets have different implementation principles and features. The following table lists the differences in capabilities. 52 53| Category | JS Widget | ArkTS Widget | 54| ------------ | --------- | ---------- | 55| Development paradigm | Web-like paradigm| Declarative paradigm| 56| Component capability | Supported | Supported | 57| Layout capability | Supported | Supported | 58| Event capability | Supported | Supported | 59| Custom animation | Not supported | Supported | 60| Custom drawing | Not supported | Supported | 61| Logic code execution| Not supported | Supported | 62 63## Related Kits 64 65- Ability Kit: Form Kit relies on the Extension abilities of Ability Kit for its internal implementation and interacts with Ability Kit during lifecycle scheduling. 66- ArkUI: Form Kit widget hosts can use some components, events, animations, and state management capabilities provided by ArkUI on their pages. 67 68<!--RP1--><!--RP1End--> 69