Movatterモバイル変換


[0]ホーム

URL:


CoreUI Angular Logo
Framework:
Getting startedIntroductionSupport CoreUICustomizeSassOptionsCSS VariablesLayoutBreakpointsContainersGridColumnsGuttersFormsOverviewAutocompletePRODate 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 thePage Visibility APIopen in a new windowopen 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 orcustom 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 withc-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

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

First slidePreviousNext
Loading...
Loading...

Dark variant

Adddark property to thec-carousel for darker controls, indicators, and captions. Controls have been inverted from their default white fill with thefilter CSS property. Captions and controls have additional Sass variables that customize thecolor andbackground-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
propdescriptiontypedefaultnotes
activeIndexIndex of the active itemnumber0
animateCarousel automatically starts cycle itemsbooleantrue
darkAdd darker controls, indicators, and captionsbooleanundefined
directionCarousel directionnext, prevnext
intervalThe amount of time to delay between automatically cycling an item. If false, carousel will not automatically cyclenumber0
pausehover pauses the cycling of the carousel onmouseenter and resumes onmouseleave. When set tofalse, hovering won't pausehover | falsehover
touchSupport left/right swipe interactions on touchscreen devices.booleantrue
transitionType of the transitionslide, crossfadeslide
wrapSet whether the carousel should cycle continuously or have hard stopsbooleantrue
Outputs
propdescriptiontypenotes
itemChangeEvent emitted on carousel item changenumber

c-carousel-caption

component


c-carousel-control

component

Inputs
propdescriptiontypedefaultnotes
captionCarousel control captionstring0
directionCarousel control directionprev, nextnext

c-carousel-indicators

component


c-carousel-inner

component


c-carousel-item

component

Inputs
propdescriptiontypedefaultnotes
intervalTime delay before cycling to next item. If -1, uses carousel interval value.number-1

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

Currently v5.5.17 Code licensed MIT, docs CC BY 3.0 .
CoreUI PRO requires acommercial license.


[8]ページ先頭

©2009-2025 Movatter.jp