目录

About This Kit

Form Kit provides a development framework and APIs for embedding app information on the home screenand system apps such as the lock screen. It allows you to extract important information or frequently used operations from an app into service widgets (widgets for short). By adding widgets to the home screenand system apps such as the lock screen, you can achieve convenient information display and direct service access.

Scenarios for Widget Usage

  1. Touch and hold an application icon on the home screen to display the shortcut menu.
  2. Tap widget, go to the widget management page, and preview the widget.
  3. Tap the Add to home button. You can then view the widget on the home screen.

Figure 1 Typical procedure of using a widget

Widget Architecture

Figure 2 Widget architecture

Fundamental Concepts in Widget Usage Scenarios

Features

Development Modes

Model Selection

The 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.

UI Development Paradigm Selection

ArkTS widgets and JS widgets have different implementation principles and features. The following table lists the differences in capabilities.

Category JS Widget ArkTS Widget
Development paradigm Web-like paradigm Declarative paradigm
Component capability Supported Supported
Layout capability Supported Supported
Event capability Supported Supported
Custom animation Not supported Supported
Custom drawing Not supported Supported
Logic code execution Not supported Supported