Search results

Carousel

Properties

animation

CarouselAnimationSettingsModel

Specifies the animation setting for the carousel component.

Defaults to { effect: ‘Slide’, customEffect: null }

autoPlay

boolean

Defines whether the slide transition is automatic or manual.

Defaults to true

buttonsVisibility

string

Defines how to show the previous, next and play pause buttons visibility. The possible values for this property as follows

  • Hidden
  • Visible
  • VisibleOnHover

Defaults to ‘Visible’

cssClass

string

Accepts single/multiple classes (separated by a space) to be used for carousel customization.

Defaults to null

dataSource

Record[]

Specifies the datasource for the carousel items.

Defaults to []

enablePersistence

boolean

Enable or disable persisting component’s state between page reloads.

Defaults to false

enableRtl

boolean

Enable or disable rendering component in right to left direction.

Defaults to false

enableTouchSwipe

boolean

Defines whether to enable swipe action in touch devices or not.

Defaults to true

height

string | number

Specifies the height of the Carousel in pixels/number/percentage. The number value is considered as pixels.

Defaults to ‘100%’

htmlAttributes

Record

Accepts HTML attributes/custom attributes to add in individual carousel item.

Defaults to null

indicatorsTemplate

string

Accepts the template for indicator buttons.

Defaults to null

interval

number

Specifies the interval duration in milliseconds for carousel item transition.

Defaults to 5000

itemTemplate

string

Specifies the template option for carousel items.

Defaults to null

items

CarouselItemModel[]

Allows defining the collection of carousel item to be displayed on the Carousel.

Defaults to []

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to

loop

boolean

Defines whether the slide transitions loop end or not. When set to false, the transition stops at last slide.

Defaults to true

nextButtonTemplate

string

Accepts the template for next navigation button.

Defaults to null

playButtonTemplate

string

Accepts the template for play/pause button.

Defaults to null

previousButtonTemplate

string

Accepts the template for previous navigation button.

Defaults to null

selectedIndex

number

Specifies index of the current carousel item.

Defaults to 0

showIndicators

boolean

Defines whether to show the indicator positions or not. The indicator positions allow to know the current slide position of the carousel component.

Defaults to true

showPlayButton

boolean

Defines whether to show play button or not.

Defaults to false

width

string | number

Specifies the width of the Carousel in pixels/number/percentage. The number value is considered as pixels.

Defaults to ‘100%’

Methods

addEventListener

Adds the handler to the given event listener.

Parameter Type Description
eventName string A String that specifies the name of the event
handler Function Specifies the call to run when the event occurs.

Returns void

appendTo

Appends the control within the given HTML element

Parameter Type Description
selector (optional) string | HTMLElement Target element where control needs to be appended

Returns void

dataBind

When invoked, applies the pending property changes immediately to the component.

Returns void

destroy

Method for destroy the carousel component.

Returns void

getLocalData

Returns the persistence data for component

Returns any

getRootElement

Returns the route element of the component

Returns HTMLElement

next

Method to transit from the current slide to the next slide.

Returns void

pause

Method to pause the slides programmatically.

Returns void

play

Method to play the slides programmatically.

Returns void

prev

Method to transit from the current slide to the previous slide.

Returns void

refresh

Applies all the pending property changes and render the component again.

Returns void

removeEventListener

Removes the handler from the given event listener.

Parameter Type Description
eventName string A String that specifies the name of the event to remove
handler Function Specifies the function to remove

Returns void

Inject

Dynamically injects the required modules to the component.

Parameter Type Description
moduleList Function[] ?

Returns void

Events

slideChanged

EmitType<SlideChangedEventArgs>

The event will be fired after the slide changed.

slideChanging

EmitType<SlideChangingEventArgs>

The event will be fired before the slide change.