Angular PrimeNG Carousel AutoPlay and Circular Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use Basic Carousel in Angular PrimeNG. Angular PrimeNG Basic Carousel is used to render the basic carousel. Carousel is a slider-type component that offers high customization. Angular PrimeNG Carousel Autoplay and Circular: To scroll the Carousel automatically, we can define time in property autoplayInterval. Time is in milliseconds. In addition, for infinite scrolling, circular property needs to be enabled. Note that in autoplay mode, the circular is enabled by default. Syntax: <p-carousel [value]="..." [autoplayInterval]="3000" [circular]="true"> <ng-template let-item pTemplate="item"> Content to display </ng-template> </p-carousel> Creating Angular application & Module Installation: Step 1: Create an Angular application using the following command. ng new appname Step 2: After creating your project folder i.e. appname, move to it using the following command. cd appname Step 3: Install PrimeNG in your given directory. npm install primeng --save npm install primeicons --save Project Structure: It will look like the following: Example 1: In this example, we will learn about autoplayInterval property . app.component.html HTML <div id="GFG"> <h1 style="color:green;">GeeksforGeeks</h1> <h2>Angular PrimeNG Carousel Autoplay </h2> <div style="width:80%;"> <p-carousel [value]="images" [autoplayInterval]="1000"> <ng-template let-images pTemplate="item"> <div class="product-item" style="width:80%"> <div class="product-item-content"> <img [src]="images.previewImageSrc" style="overflow: hidden;background-repeat: no-repeat;" width="100%" height="100%" [alt]="images.alt" [title]="images.title"> </div> </div> </ng-template> </p-carousel> </div> </div> app.component.css CSS .product-item-content { border: 1px solid var(--surface-d); border-radius: 3px; margin: 0.3rem; text-align: center; padding: 2rem 0; background-color: snow; } .product-image { width: 50%; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); } h3{ color:red; text-align: center; } app.component.ts JavaScript import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'GFG'; images: any[] = [ { previewImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20210203171024/CSSTutorial.png', thumbnailImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20210203171024/CSSTutorial.png', alt: 'Cascading Style Sheet', title: 'CSS' }, { previewImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20210322182256/AngularJS-Tutorial.png', thumbnailImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20210322182256/AngularJS-Tutorial.png', alt: 'Angular for Front end', title: 'Angular' }, { previewImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/Java.png', thumbnailImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/Java.png', alt: 'Java Programming Language', title: 'Java' }, { previewImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20220401124017/HTML-Tutorial.png', thumbnailImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20220401124017/HTML-Tutorial.png', alt: 'HyperText Markup Language', title: 'HTML' }, ]; } app.module.ts JavaScript import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; import { CarouselModule } from 'primeng/carousel'; @NgModule({ declarations: [ AppComponent, ], imports: [ BrowserModule, CarouselModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { } Output: Example 2: In this example, we will learn about circular property. app.component.html HTML <div id="GFG" style="50%"> <h1 style="color:green">GeeksforGeeks</h1> <h2>Angular PrimeNG Carousel Circular</h2> <div style="width:50%;"> <p-carousel [value]="images" [circular]="true"> <ng-template let-images pTemplate="item"> <div class="product-item" style="width:80%"> <div class="product-item-content"> <img [src]="images.previewImageSrc" style="overflow: hidden; background-repeat: no-repeat;" width="100%" height="100%" [alt]="images.alt" [title]="images.title"> </div> </div> </ng-template> </p-carousel> </div> </div> app.component.css CSS .product-item-content { border: 1px solid var(--surface-d); border-radius: 3px; margin: 0.3rem; text-align: center; padding: 2rem 0; background-color: snow; } .product-image { width: 50%; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); } h3{ color:red; text-align: center; } app.component.ts JavaScript import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'GFG'; images: any[] = [ { previewImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20210203171024/CSSTutorial.png', thumbnailImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20210203171024/CSSTutorial.png', alt: 'Cascading Style Sheet', title: 'CSS' }, { previewImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20210322182256/AngularJS-Tutorial.png', thumbnailImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20210322182256/AngularJS-Tutorial.png', alt: 'Angular for Front end', title: 'Angular' }, { previewImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/Java.png', thumbnailImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/Java.png', alt: 'Java Programming Language', title: 'Java' }, { previewImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20220401124017/HTML-Tutorial.png', thumbnailImageSrc: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20220401124017/HTML-Tutorial.png', alt: 'HyperText Markup Language', title: 'HTML' }, ]; } app.module.ts JavaScript import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; import { CarouselModule } from 'primeng/carousel'; @NgModule({ declarations: [ AppComponent, ], imports: [ BrowserModule, CarouselModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { } Output: Reference: http://primefaces.org/primeng/carousel Comment More infoAdvertise with us Next Article Angular PrimeNG Carousel Properties N nikitamehrotra99 Follow Improve Article Tags : Technical Scripter Web Technologies AngularJS Technical Scripter 2022 Angular-PrimeNG +1 More Similar Reads Carousel ComponentAngular PrimeNG Carousel ComponentAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more. 5 min read Angular PrimeNG Carousel BasicAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use Basic Carousel in Angular PrimeNG. Angular PrimeNG Basic Carous 4 min read Angular PrimeNG Carousel VerticalAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use Basic Carousel in Angular PrimeNG. Angular PrimeNG Basic Carous 4 min read Angular PrimeNG Carousel Items Per Page and Scroll ItemsAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use Carousel in Angular PrimeNG. Angular PrimeNG Basic Carousel is 4 min read Angular PrimeNG Carousel ResponsiveAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use Basic Carousel in Angular PrimeNG. Angular PrimeNG Basic Carous 4 min read Angular PrimeNG Carousel Header and FooterAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use Basic Carousel in Angular PrimeNG. Angular PrimeNG Basic Carous 4 min read Angular PrimeNG Carousel OrientationAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use Carousel in Angular PrimeNG. Angular PrimeNG Basic Carousel is 4 min read Angular PrimeNG Carousel AutoPlay and CircularAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use Basic Carousel in Angular PrimeNG. Angular PrimeNG Basic Carous 4 min read Angular PrimeNG Carousel PropertiesAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more. 4 min read Angular PrimeNG Carousel EventsAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more. 4 min read Angular PrimeNG Carousel TemplatesAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more. 4 min read Angular PrimeNG Carousel StylingAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more. 4 min read Galleria ComponentAngular PrimeNG Galleria ComponentAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will be seeing Angular PrimeNG Galleria Component. Angular PrimeNG Galleria is a 6 min read Angular PrimeNG Galleria DocumentaionAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see Angular PrimeNG Galleria Component. The Galleria in Angular PrimeNG is 4 min read Angular PrimeNG Galleria ProgrammaticAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see the Angular PrimeNG Galleria Programmatic. The Galleria is an advanced 4 min read Angular PrimeNG Galleria IndicatorAngular PrimeNG is an open-source UI component library for Angular Applications. Using the components provided by Angular PrimeNG, one can create stunning and responsive angular applications. In this article, we will see the Angular PrimeNG Galleria Indicator. Galleria is an advanced component to di 5 min read Angular PrimeNG Galleria ThumbnailAngular PrimeNG is an open-source UI component library for Angular Applications. Using the components provided by Angular PrimeNG, one can create stunning and responsive angular applications. In this post, we will see Angular PrimeNG Galleria Thumbnail. Galleria is an advanced component to display i 5 min read Angular PrimeNG Galleria NavigatorAngular PrimeNG is an open-source UI component library for Angular Applications. Using the components provided by Angular PrimeNG, one can create stunning and responsive angular applications. In this article, we will see Angular PrimeNG Galleria Navigator. Galleria is an advanced component to displa 4 min read Angular PrimeNG Galleria ResponsiveAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see the Angular PrimeNG Galleria Responsive. Galleria in Angular PrimeNG is 4 min read Angular PrimeNG Galleria FullScreenAngular PrimeNG is an open-source UI component library for Angular Applications. Using the components provided by Angular PrimeNG, one can create stunning and responsive angular applications. In this post, we will see Angular PrimeNG Galleria FullScreen. Galleria is an advanced component to display 4 min read Angular PrimeNG Galleria AutoPlayAngular PrimeNG is an open-source UI component library for Angular Applications. Using the components provided by Angular PrimeNG, one can create stunning and responsive angular applications. In this article, we will see Angular PrimeNG Galleria AutoPlay. Galleria is an advanced component to display 3 min read Angular PrimeNG Galleria CaptionAngular PrimeNG is an open-source UI component library for Angular Applications. Using the components provided by Angular PrimeNG, one can create stunning and responsive angular applications. In this post, we will see Angular PrimeNG Galleria Caption. Galleria is an advanced component to display ima 4 min read Image ComponentAngular PrimeNG Image ComponentAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more. 4 min read Angular PrimeNG Image BasicAngular PrimeNG is an open-source UI component library for Angular Applications. Using the components provided by Angular PrimeNG, one can create stunning and responsive angular applications. In this post, we will see Angular PrimeNG Image Basic. The Image component is used to show a single image to 3 min read Angular PrimeNG Image PreviewAngular PrimeNG is an open-source UI component library for Angular Applications. Using the components provided by Angular PrimeNG, one can create stunning and responsive angular applications. In this post, we will see Angular PrimeNG Image Preview. The Image component is used to show a single image 3 min read Angular PrimeNG Image Indicator TemplatingAngular PrimeNG is an open-source UI component library for Angular Applications. Using the components provided by Angular PrimeNG, one can create stunning and responsive angular applications. In this post, we will see Angular PrimeNG Image Indicator Templating. The Image Component is used to show a 3 min read Angular PrimeNG Image PropertiesAngular PrimeNG is an open-source UI component library for Angular Applications. Using the components provided by Angular PrimeNG, one can create stunning and responsive angular applications. In this article, we will see Angular PrimeNG Image Properties. The Image component is used to show a single 3 min read Angular PrimeNG Image EventsAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use Angular PrimeNG Image Events. The Image Component is used t 3 min read Angular PrimeNG Image TemplatesAngular PrimeNG is an open-source library that consists of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will discuss Angular PrimeNG Image Templates. The Image Component is used to show an 3 min read Angular PrimeNG Image StylingAngular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more. 3 min read Like