CoreUI Angular Logo
Framework:
  • JavaScript / Vanilla JS
  • React.js
  • Vue.js
Getting startedIntroductionSupport CoreUICustomizeSassOptionsCSS VariablesLayoutBreakpointsContainersGridColumnsGuttersFormsOverviewDate PickerPRODate Range PickerPROForm ControlSelectMulti SelectPROChecks & RadiosPassword InputPRORangeRange SliderPRORatingPROStepperPROInput GroupFloating LabelsLayoutTime PickerPROValidationComponentsAccordionAlertAvatarBadgeBreadcrumbButtonButton GroupCalendarPROCalloutCardCarouselClose buttonCollapseDropdownFooterHeaderImageList GroupLoading ButtonPROModalNavNavbarOffcanvasPaginationPlaceholderPopoverProgressSmart PaginationPROSmart TablePROSidebarSpinnerTableTabsNewToastTooltipWidgetsIconsChartsTemplatesNewAdmin & DashboardDownloadInstallationCustomizeContentMigrationv4 → v5v3 → v4Angular version


DownloadHire UsGet CoreUI PRO
On this page

    Angular Carousel Component

    Angular Carousel is a slideshow component for cycling through elements—images or slides of text—like a carousel.

    How it works

    The Angular carousel is a slideshow for cycling within a group of content. It runs with a group of images, text, or html elements. It also incorporates support for previous/next buttons.

    In browsers where the Page Visibility APIopen in a new window open in new window is supported, the carousel will avoid sliding when the webpage is not visible to the user (such as when the browser tab is inactive, the browser window is minimized, etc).

    Example

    Carousels don't automatically normalize slide dimensions. As such, you may want to use extra utilities or custom methods to properly size content. While carousels support previous/next controls and indicators, they're not explicitly expected. Add and customize as you see fit.

    Slides only

    Loading...
    Loading...

    With controls

    Adding in the previous and next controls with c-carousel-controls component.

    PreviousNext
    Loading...
    Loading...

    With indicators

    You can attach the indicators to the carousel, lengthwise the controls, too.

    PreviousNext
    Loading...
    Loading...
    Loading...

    With captions

    You can add captions to slides with the <c-carousel-caption> element within any <c-carousel-item>. They can be immediately hidden on smaller viewports, as shown below, with optional [display utilities](https://coreui.io/docs/utilities/display) We hide them with .d-none and draw them back on medium-sized devices with .d-md-block.

    First slide

    First slide

    Nulla vitae elit libero, a pharetra augue mollis interdum.

    PreviousNext
    Loading...
    Loading...

    Crossfade

    Add transition="crossfade" to your carousel to animate slides with a fade transition instead of a slide.

    First slidePreviousNext
    Loading...
    Loading...

    Dark variant

    Add dark property to the c-carousel for darker controls, indicators, and captions. Controls have been inverted from their default white fill with the filter CSS property. Captions and controls have additional Sass variables that customize the color and background-color.

    First slide

    First slide

    Nulla vitae elit libero, a pharetra augue mollis interdum.

    PreviousNext
    Loading...
    Loading...

    API reference

    CarouselModule

    import { CarouselModule } from '@coreui/angular';
    
    @NgModule({
       imports: [CarouselModule,]
    })
    export class AppModule() { }
    

    c-carousel

    component

    Inputs
    prop description type default notes
    activeIndex Index of the active item number 0
    animate Carousel automatically starts cycle items boolean true
    dark Add darker controls, indicators, and captions boolean undefined
    direction Carousel direction next, prev next
    interval The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle number 0
    pause hover pauses the cycling of the carousel on mouseenter and resumes on mouseleave. When set to false, hovering won't pause hover | false hover
    touch Support left/right swipe interactions on touchscreen devices. boolean true
    transition Type of the transition slide, crossfade slide
    wrap Set whether the carousel should cycle continuously or have hard stops boolean true
    Outputs
    prop description type notes
    itemChange Event emitted on carousel item change number

    c-carousel-caption

    component


    c-carousel-control

    component

    Inputs
    prop description type default notes
    caption Carousel control caption string 0
    direction Carousel control direction prev, next next

    c-carousel-indicators

    component


    c-carousel-inner

    component


    c-carousel-item

    component

    Inputs
    prop description type default notes
    interval Time delay before cycling to next item. If -1, uses carousel interval value. number -1
    • GitHub
    • Twitter
    • Support
    • CoreUI (Vanilla)
    • CoreUI for React.js
    • CoreUI for Vue.js

    CoreUI for Angular is Open Source UI Components Library for Angular.

    Currently v5.5.2 Code licensed MIT , docs CC BY 3.0 .
    CoreUI PRO requires a commercial license.