All Projects → dockleryxk → Ng Simple Slideshow

dockleryxk / Ng Simple Slideshow

Licence: mit
A simple, responsive slideshow for Angular 4+.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Ng Simple Slideshow

Ng Select
⭐ Native angular select component
Stars: ✭ 2,781 (+2236.97%)
Mutual labels:  angular-components, angular2, angular4, angular5, angular6
Nebular
💥 Customizable Angular UI Library based on Eva Design System 🌚✨Dark Mode
Stars: ✭ 7,368 (+6091.6%)
Mutual labels:  angular-components, angular2, angular4, angular5, angular6
Ng2 Flatpickr
Angular 2+ wrapper for flatpickr (https://github.com/chmln/flatpickr)
Stars: ✭ 91 (-23.53%)
Mutual labels:  angular2, angular4, angular5, angular6
ng-toggle
Bootstrap-styled Angular Toggle Component
Stars: ✭ 14 (-88.24%)
Mutual labels:  angular2, angular4, angular5, angular6
Aspnetcore Angular Universal
ASP.NET Core & Angular Universal advanced starter - PWA w/ server-side rendering for SEO, Bootstrap, i18n internationalization, TypeScript, unit testing, WebAPI REST setup, SignalR, Swagger docs, and more! By @TrilonIO
Stars: ✭ 1,455 (+1122.69%)
Mutual labels:  angular2, angular4, angular5, angular6
Angular File Uploader
Angular file uploader is an Angular 2/4/5/6/7/8/9/10 + file uploader module with Real-Time Progress Bar, Responsive design, Angular Universal Compatibility, localization and multiple themes which includes Drag and Drop and much more.
Stars: ✭ 92 (-22.69%)
Mutual labels:  angular2, angular4, angular5, angular6
Angular Prest
pREST component for Angular
Stars: ✭ 16 (-86.55%)
Mutual labels:  angular-components, angular2, angular4, angular5
angular-rollbar-source-maps
Angular 2+ implementation to upload sourcemaps to Rollbar
Stars: ✭ 17 (-85.71%)
Mutual labels:  angular2, angular4, angular5, angular6
AuthGuard
Example repo for guarding routes post
Stars: ✭ 42 (-64.71%)
Mutual labels:  angular2, angular4, angular5, angular6
Ngx Smart Modal
Modal/Dialog component crafted for Angular
Stars: ✭ 256 (+115.13%)
Mutual labels:  angular2, angular4, angular5, angular6
angular-progress-bar
This component allow you to easy incorporate progress-bar to angular/ionic project, providing binding and color options
Stars: ✭ 26 (-78.15%)
Mutual labels:  angular2, angular4, angular5, angular6
Ng Http Loader
🍡 Smart angular HTTP interceptor - Intercepts automagically HTTP requests and shows a spinkit spinner / loader / progress bar
Stars: ✭ 327 (+174.79%)
Mutual labels:  angular2, angular4, angular5, angular6
Angular Froala Wysiwyg
Angular 4, 5, 6, 7, 8 and 9 plugin for Froala WYSIWYG HTML Rich Text Editor.
Stars: ✭ 696 (+484.87%)
Mutual labels:  angular2, angular4, angular5, angular6
Angular4-seed
Angular 4 Seed for Angular Forms
Stars: ✭ 37 (-68.91%)
Mutual labels:  angular2, angular4, angular-components, angular5
Springbootangularhtml5
♨️ Spring Boot 2 + Angular 11 + HTML5 router mode + HTTP interceptor + Lazy loaded modules
Stars: ✭ 89 (-25.21%)
Mutual labels:  angular2, angular4, angular5, angular6
spring-websocket-angular6
Example for using Spring Websocket and Angular with Stomp Messaging
Stars: ✭ 18 (-84.87%)
Mutual labels:  angular2, angular4, angular5, angular6
Ng Drag Drop
Drag & Drop for Angular - based on HTML5 with no external dependencies. 🎉
Stars: ✭ 233 (+95.8%)
Mutual labels:  angular-components, angular2, angular4, angular5
Angular Material App
基于最新Angular 9框架与Material 2技术的web中后台前端应用框架。
Stars: ✭ 509 (+327.73%)
Mutual labels:  angular2, angular4, angular5, angular6
angular2-cookie-law
Angular2+ component that provides a banner to inform users about cookie law
Stars: ✭ 38 (-68.07%)
Mutual labels:  angular2, angular4, angular-components, angular6
Ngx Monaco Editor
Monaco Editor component for Angular 2 and Above
Stars: ✭ 347 (+191.6%)
Mutual labels:  angular2, angular4, angular5, angular6
 _  _      ___ _            _     ___ _ _    _        _
| \| |__ _/ __(_)_ __  _ __| |___/ __| (_)__| |___ __| |_  _____ __ __
| .` / _` \__ \ | '  \| '_ \ / -_)__ \ | / _` / -_|_-< ' \/ _ \ V  V /
|_|\_\__, |___/_|_|_|_| .__/_\___|___/_|_\__,_\___/__/_||_\___/\_/\_/
     |___/            |_|

Note (09/2019):

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.

Features

  • NgSimpleSlideshow has no dependencies besides angular. All animations are 100% CSS, so @angular/animations is not needed.
  • Compiled and packaged in the Angular Package Format v4.0 with ng-packagr.
  • Compiled to es5, so this package is compatible with Angular Universal.
  • AOT ready
  • Responsive and captures swipes from phones and tablets
  • Lazy load option to help with initial pageload speed

Installation

Easy, just npm install:

npm i -S ng-simple-slideshow

Next, import the module:

import {SlideshowModule} from 'ng-simple-slideshow';

@NgModule({
  imports: [
    SlideshowModule,
    ...
  ],
  declarations: [
    ...
  ],
  exports: [
    ...
  ]
})
...

Usage

The simplest use case is the following:

<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):

<slideshow [height]="height"
           [minHeight]="'525px'"
           [autoPlay]="true"
           [showArrows]="false"
           [imageUrls]="imageSources"
           [lazyLoad]="imageSources?.length > 1"
           [autoPlayWaitForLazyLoad]="true">
</slideshow>

More Info on imageUrls

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.

Options

Inputs

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

Output Events

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.

API

Take control of the slideshow if you want! Simply create a reference to your slideshow like so:

<slideshow #slideshow [imageUrls]="imageUrlArray"></slideshow>

and in your component.ts reference it as a ViewChild:

@ViewChild('slideshow') slideshow: any;

Now you can access the public members such as the goToSlide and onSlide:

this.slideshow.goToSlide(3); // go to slide index 3 (i.e. imageUrls[3])
this.slideshow.onSlide(1); // next slide
this.slideshow.onSlide(-1); // previous slide
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].