Properties Methods Events Config Options Direct Link
Observable
  Component
    Component
      Container
        Container
          Panel
            Panel
              Carousel

Class Ext.Carousel

Package:Ext
Defined In:Carousel.js
Class:Carousel
Extends:Panel

A customized Panel which provides the ability to slide back and forth between different child items.

Useful Properties

Useful Methods

Screenshot:

Example code:

var carousel = new Ext.Carousel({
    items: [
        {
            html: '<p>Navigate the carousel on this page by swiping left/right.</p>',
            cls : 'card card1'
        },
        {
            html: '<p>Clicking on either side of the indicators below</p>',
            cls : 'card card2'
        },
        {
            html: 'Card #3',
            cls : 'card card3'
        }
    ]
});

var panel = new Ext.Panel({
    cls: 'cards',
    layout: {
        type : 'vbox',
        align: 'stretch'
    },
    defaults: {
        flex: 1
    },
    items: [
        carousel,
        {
            xtype    : 'carousel',
            ui       : 'light',
            direction: 'vertical',
            
            items: [
            {
                    html: '<p>Carousels can be vertical and given a ui of "light" or "dark".</p>',
                    cls : 'card card1'
                },
                {
                    html: 'Card #2',
                    cls : 'card card2'
                },
                {
                    html: 'Card #3',
                    cls : 'card card3'
                }
            ]
        }
    ]
});

Config Options

Config OptionsDefined By
 baseCls : String
The base CSS class to apply to the Carousel's element (defaults to 'x-carousel').
Carousel
 centered : Boolean
Center the Component. Defaults to false.
Component
 componentCls : String
CSS Class to be added to a components root level element to give distinction to it via styling.
Component
 data : Mixed
The initial set of data to apply to the tpl to update the content area of the Component.
Component
 direction : String
The direction of the Carousel. Default is 'horizontal'. 'vertical' also available.
Carousel
 disabled : Boolean
Defaults to false.
Component
 disabledCls : String
CSS class to add when the Component is disabled. Defaults to 'x-item-disabled'.
Component
 draggable : Boolean
Allows the component to be dragged via the touch event.
Component
 floating : Boolean
Create the Component as a floating and use absolute positioning. Defaults to false.
Component
 floatingCls : Boolean
The class that is being added to this component when its floating. (defaults to x-floating)
Component
 height : Number
The height of this component in pixels.
Component
 hidden : Boolean
Defaults to false.
Component
 indicator : Boolean
Provides an indicator while toggling between child items to let the user know where they are in the card stack.
Carousel
 monitorOrientation : Boolean
Monitor Orientation change
Component
 stopMaskTapEvent : Boolean
True to stop the event that fires when you click outside the floating component. Defalts to true.
Component
 styleHtmlCls : String
The class that is added to the content target when you set styleHtmlContent to true. Defaults to 'x-html'
Component
 ui : String
Style options for Carousel. Default is 'dark'. 'light' is also available.
Carousel
 width : Number
The width of this component in pixels.
Component

Public Properties

PropertyDefined By
 draggable : Boolean
Read-only property indicating whether or not the component can be dragged
Component
 items : Ext.util.MixedCollection
The MixedCollection containing all the child items of this container.
Container
 rendered : Boolean
Read-only property indicating whether or not the component has been rendered.
Component

Public Methods

MethodDefined By

Public Events

EventDefined By