Circular image
The circular image component is a UI element used to display images. It supports image previews and lets you set the image source and related styles.

Configuration items
Category |
Configuration |
Example |
Description |
Content |
Image source |
Three modes for the image resource. |
|
URL |
|
This takes effect when the image source is set to URL. The value is the link to the image. |
|
System file |
This takes effect when the image source is set to System file. Select an image from the built-in resource files or click the selection box below to upload one directly. |
||
Memory object |
|
This takes effect when the image source is set to Memory object. It can be used with an upload component. For example: |
|
Hot area configuration |
Lets you define specific areas on an image. Clicking these areas can trigger specific interactive behaviors to enhance the user experience. |
||
Image description |
The text to display when the image fails to load. |
||
Fallback address on load failure |
|
Displays a preset image placeholder when the image fails to load. |
|
Progressive load |
Enable Progressive load to improve user experience and avoid long waits for large images to load. It optimizes the visual experience by first showing a simplified preview, such as a low-resolution image, a solid color background, or a Low Quality Image Placeholder (LQIP), before the full image is loaded. |
||
Allow preview |
Lets users click the image to open a pop-up layer and view a high-definition preview. |
||
Preview configuration |
Redefine the preview image path. The default is the current image resource. |
||
Interaction |
Hide |
Controls the default display state of the image component. When set to |
|
Style |
Height |
The component height. For more information, see Common properties |
|
Margin |
For more information, see Common properties |
||
Padding |
Specifies how the image content should fit into the box defined by its height and width. For more information, see the object-fit property
|
||
Image layout |
Specifies the position of the image within the component when the fit mode is set to Contain. |
||
CSS style |
Border radius |
The border radius of the image component. You can create a circular image by making the image width and height equal and setting the border radius to 50%. |
|
Flip |
|
The flip mode for the image. Supports horizontal and vertical flipping. The pivot point is the centroid of the image. For more information, see the rotate property |
Properties and methods
Name |
Type |
Example |
Description |
mode |
string |
|
Image source. |
src |
string |
|
The link of the current image component. |
file |
object |
|
Read-only. The image file resource. |
srcFile |
object |
|
Read-only. The image memory object. |
fallback |
string |
|
Read-only. Displays a preset image placeholder when the image fails to load. |
placeholder |
string |
|
Read-only. The link to the image for progressive loading. |
alt |
string |
|
Read-only. The text to display when the image fails to load. |
preview |
boolean |
|
Read-only. Specifies whether the image can be clicked for a preview. |
hotAreas |
object |
|
Read-only. The hot area configuration information for the image. |
hidden |
boolean |
|
Specifies whether the current component is hidden. For more information, see Common properties |
setSrc |
func |
|
Sets the image link to |
clearSrc |
func |
|
Clears the image link. |
setHidden |
func |
|
Sets whether the image is hidden. The parameter can be |
clearHidden |
func |
|
Clears the hidden state of the image. For more information, see Common properties |
Event callbacks
Configuration |
Description |
The event that is triggered when the image is clicked. |
|
The event that is triggered when the image fails to load. |
Scenario example
Team member introduction scenario
On a corporate website or project page, photos of team members are often displayed as circles. This improves the overall aesthetics of the page and presents information more concisely.





