A minimal customizable angular library for creating stunning product galleries like Flipkart, Amazon and other Top E-commerce platforms! π
Built to help developers showcase products like a pro, with minimal effort and maximum style. π
Key Features β’ Installation β’ How To Use β’ Demo β’ Support β’ License
- πΌοΈ Dynamic Image Galleries: Perfect for showcasing product collections.
- π οΈ Easy Customization: Tailor it to fit your brandβs unique aesthetic.
- β‘ Angular Power: Built using Angularβs latest features for blazing performance.
npm install ngx-product-gallery
First, import the NgxProductGalleryComponent to your component/module:
import { Component } from '@angular/core';
import { NgxProductGalleryComponent } from 'ngx-product-gallery';
@Component({
selector: 'app-demo',
standalone: true,
imports: [NgxProductGalleryComponent],
templateUrl: './demo.component.html',
styleUrl: './demo.component.scss'
})
export class DemoComponent {}
// or
import { NgxProductGalleryComponent } from 'ngx-product-gallery';
@NgModule({
declarations: [...],
imports: [NgxProductGalleryComponent],
bootstrap: [...]
})
export class AppModule {}
Then use the NgxProductGalleryComponent in your HTML like below:
<ngx-product-gallery
[images]="images">
</ngx-product-gallery>
Pass Your Images
import { Component } from '@angular/core';
import { IImage, NgxProductGalleryComponent } from 'ngx-product-gallery';
@Component({
selector: 'app-demo',
standalone: true,
imports: [NgxProductGalleryComponent],
templateUrl: './demo.component.html',
styleUrl: './demo.component.scss'
})
export class DemoComponent {
images: IImage[] = [
{ thumbnail: 'https://picsum.photos/id/1/64', image: 'https://picsum.photos/id/1/1200', altText: 'Image 1', id: 1 },
{ thumbnail: 'https://picsum.photos/id/2/64', image: 'https://picsum.photos/id/2/1200', altText: 'Image 2', id: 2 },
{ thumbnail: 'https://picsum.photos/id/3/64', image: 'https://picsum.photos/id/3/1200', altText: 'Image 3', id: 3 },
{ thumbnail: 'https://picsum.photos/id/4/64', image: 'https://picsum.photos/id/4/1200', altText: 'Image 4', id: 4 },
{ thumbnail: 'https://picsum.photos/id/5/64', image: 'https://picsum.photos/id/5/1200', altText: 'Image 5', id: 5 },
{ thumbnail: 'https://picsum.photos/id/6/64', image: 'https://picsum.photos/id/6/1200', altText: 'Image 6', id: 6 },
{ thumbnail: 'https://picsum.photos/id/7/64', image: 'https://picsum.photos/id/7/1200', altText: 'Image 7', id: 7 },
{ thumbnail: 'https://picsum.photos/id/8/64', image: 'https://picsum.photos/id/8/1200', altText: 'Image 8', id: 8 },
{ thumbnail: 'https://picsum.photos/id/9/64', image: 'https://picsum.photos/id/9/1200', altText: 'Image 9', id: 9 },
]
}
Weβre better together! Got an idea? Found a bug? Letβs collab! Check out CONTRIBUTING.md to know the deets.
This project is licensed under the MIT License. Check out the LICENSE.md file for more.
- π Star this repo to support us.
- π¦ Follow us on Twitter.
- πΌ Connect on LinkedIn.
Checkout how it works in Stackblitz - In progress