Gathering detailed insights and metrics for ng-simple-slideshow
Gathering detailed insights and metrics for ng-simple-slideshow
Gathering detailed insights and metrics for ng-simple-slideshow
Gathering detailed insights and metrics for ng-simple-slideshow
npm install ng-simple-slideshow
Typescript
Module System
Node Version
NPM Version
TypeScript (72.21%)
HTML (14.55%)
CSS (10.69%)
JavaScript (2.55%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
122 Stars
231 Commits
77 Forks
5 Watchers
30 Branches
12 Contributors
Updated on Feb 23, 2025
Latest Version
1.2.9
Package Id
ng-simple-slideshow@1.2.9
Unpacked Size
375.85 kB
Size
73.21 kB
File Count
20
NPM Version
6.9.0
Node Version
11.6.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
1 _ _ ___ _ _ ___ _ _ _ _ 2| \| |__ _/ __(_)_ __ _ __| |___/ __| (_)__| |___ __| |_ _____ __ __ 3| .` / _` \__ \ | ' \| '_ \ / -_)__ \ | / _` / -_|_-< ' \/ _ \ V V / 4|_|\_\__, |___/_|_|_|_| .__/_\___|___/_|_\__,_\___/__/_||_\___/\_/\_/ 5 |___/ |_|
v1.3.0-beta.2 will be in beta until I update the way ng-packagr works. It is stable enough for production (it's what I am using with Angular Universal and Service Worker).
Also, I am looking for maintainers who also using this package in a production app. I have this requirement because I need maintainers who have a vested interest in the quality of this package. Thanks.
A simple slideshow for Angular 4+.
Click here the check out the demo. Click here the see the slideshow in production on a StoragePug client site, which is what I originally made this slideshow package for.
Easy, just npm install:
1npm i -S ng-simple-slideshow
Next, import the module:
import {SlideshowModule} from 'ng-simple-slideshow';
@NgModule({
imports: [
SlideshowModule,
...
],
declarations: [
...
],
exports: [
...
]
})
...
The simplest use case is the following:
1<slideshow [imageUrls]="imageUrlArray"></slideshow>
A more complex example of how I use this in one of my own projects (full list of options in next section):
1<slideshow [height]="height" 2 [minHeight]="'525px'" 3 [autoPlay]="true" 4 [showArrows]="false" 5 [imageUrls]="imageSources" 6 [lazyLoad]="imageSources?.length > 1" 7 [autoPlayWaitForLazyLoad]="true"> 8</slideshow>
The imageUrls input can be an array of strings, however in order to enable slides to have links, captions, or custom click functions, you must use an object of type IImage instead of a string. For example usage, see here.
Option | Required | Default | Type | Description |
---|---|---|---|---|
imageUrls | yes | [] | string[] or IImage[] | array of image urls or IImage |
height | no | '100%' | string | CSS height of slideshow |
minHeight | no | string | CSS min-height of slideshow | |
arrowSize | no | '30px' | string | length of arrow lines |
showArrows | no | true | boolean | show or hide the arrows |
disableSwiping | no | false | boolean | turn swipe detection on or off |
autoPlay | no | false | boolean | turn autoPlay on or off |
autoPlayInterval | no | 3333 | number | time in ms between autoPlay slides |
stopAutoPlayOnSlide | no | true | boolean | stop autoPlay if slideshow is interacted with |
autoPlayWaitForLazyLoad | no | true | boolean | autoplay to waits for images to lazy load before changing slides |
backgroundSize | no | 'cover' | string | overwrite background-size property |
backgroundPosition | no | 'center center' | string | overwrite background-position property |
backgroundRepeat | no | 'no-repeat' | string | overwrite background-repeat property |
showDots | no | false | boolean | show clickable dots at the bottom |
dotColor | no | '#FFF' | string | color of clickable dots at the bottom |
showCaptions | no | true | boolean | show or hide captions |
captionColor | no | '#FFF' | string | color of caption text |
captionBackground | no | 'rgba(0, 0, 0, .35)' | string | color of caption background |
lazyLoad | no | false | boolean | turn on to lazy load images instead of preload |
hideOnNoSlides | no | false | boolean | set the slideshow container display to none if imageUrls is empty, null, or undefined |
fullscreen | no | false | boolean | activate full screen for the slideshow on true, go back to normal view on false |
enableZoom | no | false | boolean | enable (2 point/pinch) touch zoom in/out on images |
enablePan | no | false | boolean | enable (1 point) touch/click panning of images, NOTE: "true" will disable image on click actions |
noLoop | no | false | boolean | block looping through slideshow like a circular list |
Event | Description |
---|---|
onSlideLeft | when the left arrow is clicked |
onSlideRight | when the right arrow is clicked |
onSwipeLeft | when a swipe left occurs |
onSwipeRight | when a swipe right occurs |
onFullscreenExit | when fullscreen exits |
onIndexChanged | when slide index changes |
onImageLazyLoad | when slide image lazy loads |
onClick | when slide (not arrows) is clicked |
Note: all events emit the index number of the new slide, with the exception of onClick which returns the slide object in addition to the index.
Take control of the slideshow if you want! Simply create a reference to your slideshow like so:
1<slideshow #slideshow [imageUrls]="imageUrlArray"></slideshow>
and in your component.ts reference it as a ViewChild:
1@ViewChild('slideshow') slideshow: any;
Now you can access the public members such as the goToSlide and onSlide:
1this.slideshow.goToSlide(3); // go to slide index 3 (i.e. imageUrls[3])
1this.slideshow.onSlide(1); // next slide
1this.slideshow.onSlide(-1); // previous slide
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/29 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
160 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More