Physical pixel (px): represents physical pixels on the screen. 1 px corresponds to one physical pixel on the screen.
Logical pixel (lpx): represents logic pixels. This unit is the ratio of the actual screen width to the logical width (configured by designWidth whose default value is 720). For example, if designWidth is set to 720, then 1 lpx is equal to 2 px for a screen with a 1440 px width.
Virtual pixel (vp): represents screen density–dependent pixels. The vp-to-px conversion ratio depends on the screen's pixel density. This unit is used for values whose unit is not specified.
vp is a virtual pixel unit, meaning it adapts according to the screen density, ensuring consistent visual effects across devices with varying screen densities.
Font pixel (fp): represents font pixels that scale based on the system font size settings. By default, the font pixel size is the same as that of the virtual pixel size. That is, 1 fp = 1 vp. If users select a larger font size in the settings, the actual font size is the virtual pixel size multiplied by the scale coefficient. That is, 1 fp = 1 vp * scale.
Percentage: specifies a length in percentage, for example, '10%'.
Resource: references a resource in the component attributes.
A Resource object can be created using $r or $rawfile. Once an object is created, modifying attribute values of the object is prohibited.