1e41f4b71Sopenharmony_ci# Introduction to Form Kit
2e41f4b71Sopenharmony_ciForm Kit provides an effective way of presenting information on the UI – service widget. A service widget (also called widget) is a set of UI components that display important information or operations specific to an application. It provides users with direct access to a desired application service, without the need to open the application first. A widget is usually displayed as part of the UI of another application (which can only be a system application, such as the home screen) and provides basic interactive features such as opening a UI page or sending a message.
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Service Widget Architecture
5e41f4b71Sopenharmony_ci**Figure 1** Service widget architecture 
6e41f4b71Sopenharmony_ci![WidgetArchitecture](figures/WidgetArchitecture.png)
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ciBefore you get started, it would be helpful if you have a basic understanding of the following concepts:
9e41f4b71Sopenharmony_ci- Widget host: an application that displays the widget content and controls the widget location. An example is the home screen in the preceding figure.
10e41f4b71Sopenharmony_ci  - Application icon: an icon for entry to an application, clicking which starts the application process. The icon content does not support interactions.
11e41f4b71Sopenharmony_ci  - Widget: an interactive UI in various sizes. It may provide buttons to implement different features, such as the button to [update the widget content](arkts-ui-widget-event-formextensionability.md) or [switch to an application](arkts-ui-widget-event-router.md).
12e41f4b71Sopenharmony_ci- Widget provider: an application that provides widget content to be displayed. It controls the display content, display logic, and component click events triggered on a widget.
13e41f4b71Sopenharmony_ci  - FormExtensionAbility: a widget service logic module, which provides lifecycle callbacks invoked when a widget is created, destroyed, or updated.
14e41f4b71Sopenharmony_ci  - Widget page: a widget UI module, which contains display and interaction information such as components, layouts, and events.
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ciBelow is the typical procedure of using a widget:
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci**Figure 2** Typical procedure of using a widget
19e41f4b71Sopenharmony_ci![WidgetUse](figures/WidgetUse.png)
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci1. Touch and hold an application icon on the home screen to display the shortcut menu.
22e41f4b71Sopenharmony_ci2. Touch **Service widget** to access the preview screen.
23e41f4b71Sopenharmony_ci3. Touch the **Add to home** button. The widget is then added to the home screen.
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci## Features
26e41f4b71Sopenharmony_ci- Instant access: Widgets present important information about atomic services and applications, allowing users to access desired services instantly via shortcut gestures.
27e41f4b71Sopenharmony_ci- Always online: Multiple widget refresh mechanisms, such as scheduler and proxy, are in place to ensure that widgets are always online.
28e41f4b71Sopenharmony_ci- Restricted support: The components, events, animations, data management, state management, and API capabilities supported by widgets are restricted, striking a balance between performance, power consumption, security, and reliability.
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ci## Development Modes
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ciForm Kit can be developed in the stage (recommended) or FA model.
33e41f4b71Sopenharmony_ci
34e41f4b71Sopenharmony_ci- In the stage model, you can develop ArkTS widgets with the ArkTS-based declarative development paradigm or JS widgets with the web-like development paradigm.
35e41f4b71Sopenharmony_ci- In the FA model, you can develop JS widgets with the web-like development paradigm.
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ciArkTS widgets and JS widgets have different implementation principles and features. The following table lists the differences in capabilities.
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ci| Category        | JS Widget   | ArkTS Widget |
40e41f4b71Sopenharmony_ci| ------------ | --------- | ---------- |
41e41f4b71Sopenharmony_ci| Development paradigm    | Web-like paradigm | Declarative paradigm |
42e41f4b71Sopenharmony_ci| Component capability    | Supported     | Supported      |
43e41f4b71Sopenharmony_ci| Layout capability    | Supported     | Supported      |
44e41f4b71Sopenharmony_ci| Event capability    | Supported     | Supported      |
45e41f4b71Sopenharmony_ci| Custom animation  | Not supported   | Supported      |
46e41f4b71Sopenharmony_ci| Custom drawing  | Not supported   | Supported      |
47e41f4b71Sopenharmony_ci| Logic code execution | Not supported   | Supported      |
48e41f4b71Sopenharmony_ci
49e41f4b71Sopenharmony_ci## Related Kits
50e41f4b71Sopenharmony_ci- Ability Kit: Form Kit relies on the Extension abilities of Ability Kit for its internal implementation and interacts with Ability Kit during lifecycle scheduling.
51e41f4b71Sopenharmony_ci- ArkUI: Form Kit widget hosts can use some components, events, animations, and state management capabilities provided by ArkUI on their pages.
52e41f4b71Sopenharmony_ci
53e41f4b71Sopenharmony_ci## Constraints
54e41f4b71Sopenharmony_ciArkTS widgets are subject to the following constraints:
55e41f4b71Sopenharmony_ci- When importing modules, you can import only the modules marked with "supported in ArkTS widgets."
56e41f4b71Sopenharmony_ci- Only partial components, events, animations, data management, state management, and API capabilities of the [declarative paradigm](../ui/arkts-ui-development-overview.md) are supported.
57e41f4b71Sopenharmony_ci- The event processing of the widget is independent of that of the widget host. To prevent gesture conflicts, avoid using swipers in the widget when the widget host supports left and right swipes.
58e41f4b71Sopenharmony_ci- Shared packages cannot be imported. The native programming language cannot be used for development.
59e41f4b71Sopenharmony_ci- Instant preview, breakpoint debugging, hot reload, and timeout setting (**setTimeOut**) are not supported.
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_ciJS widgets are subject to the following constraints:
62e41f4b71Sopenharmony_ci- Animation customization, drawing customization, and logic code execution are not supported.
63