Image carousel

Updated at:

Introduction

An image carousel is a user interface component that dynamically displays multiple images or content. It typically switches between items through autoplay or user control.

image

Configuration items

Category

Configuration

Example

Description

Content

Data source

image

The data source for the image carousel.

Interaction

Hide

Controls the default display state of the image carousel. If set to true, the image carousel is hidden.

Automatic switchover

Automatically switches between items at a set interval. This lets users view all items without manual interaction.

Automatic switchover interval

The time interval for automatic switchover.

Enable drag

Lets you switch items by dragging.

Fade transition effect

Specifies whether to support a fade transition effect.

Animation effect

The animation effect for the fade transition. Supported effects include linear, ease-in, ease-out, and ease-in-out.

Transition effect duration

The duration of the fade transition animation.

Style

Height

For more information, see Common properties

Margin

For more information, see Common properties

Show arrows

Specifies whether to show the navigation arrows.

Show panel indicator dots

Specifies whether to show the navigation indicator dots.

Panel indicator dot position

The position of the indicator dots.

Image fill

Specifies how the image content should fit into the box defined by its height and width. For more information, see object-fit property

  • Cover: The image fills the entire content box of the element while maintaining its aspect ratio.

  • Contain: The image is scaled to fit within the content box while maintaining its aspect ratio.

  • Stretch: The image completely fills the component box. If the image's aspect ratio does not match the box, the image is stretched to fit.

Horizontal alignment

The horizontal alignment of the title content.

Vertical alignment

The vertical alignment of the title content.

CSS style

Background color

The background color of each item in the image carousel.

Title text color

The text color of the title content.

Indicator dot width

The width of an inactive indicator dot.

Active indicator dot width

The width of an active indicator dot.

Spacing between indicator dots

The spacing between indicator dots.

Indicator dot height

The height of the indicator dots.

Indicator dot position from edge

The distance of the indicator dots from the bottom or top edge.

Properties and methods

Name

Type

Example

Description

dataSource

array

carousel1.dataSource

Read-only. The data source of the image carousel component.

Event callbacks

Configuration

Description

The event to trigger when an item is switched.