All Projects → joselcvarela → ng2-carouselamos

joselcvarela / ng2-carouselamos

Licence: other
Simple carousel/slider for angular 2.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to ng2-carouselamos

Ngu Carousel
Angular Universal carousel
Stars: ✭ 263 (+574.36%)
Mutual labels:  slide, angular2, carousel
ngx-carousel
Angular Universal carousel is an lightweight , touchable and responsive library
Stars: ✭ 14 (-64.1%)
Mutual labels:  angular2, carousel
Simple Slider
🎠 The 1kb JavaScript Carousel
Stars: ✭ 583 (+1394.87%)
Mutual labels:  slide, carousel
Hooper
🎠 A customizable accessible carousel slider optimized for Vue
Stars: ✭ 561 (+1338.46%)
Mutual labels:  slide, carousel
Svelte Carousel
A super lightweight, super simple Carousel for Svelte 3
Stars: ✭ 144 (+269.23%)
Mutual labels:  slide, carousel
Vue Agile
🎠 A carousel component for Vue.js
Stars: ✭ 1,167 (+2892.31%)
Mutual labels:  slide, carousel
Angular2 Carousel
An lightweight , touchable and responsive library to create a carousel for angular 2 / 4 / 5
Stars: ✭ 26 (-33.33%)
Mutual labels:  angular2, carousel
React Carousel
A pure extendable React carousel, powered by Brainhub (craftsmen who ❤️ JS)
Stars: ✭ 764 (+1858.97%)
Mutual labels:  slide, carousel
React Whirligig
A react carousel/slider like component for sequentially displaying slides or sets of slides
Stars: ✭ 20 (-48.72%)
Mutual labels:  slide, carousel
React Siema
ReactSiema Demo
Stars: ✭ 90 (+130.77%)
Mutual labels:  slide, carousel
Nuka Carousel
Pure React Carousel Component
Stars: ✭ 2,607 (+6584.62%)
Mutual labels:  slide, carousel
cloud-speech-and-vision-demos
A set of demo applications that make use of google speech, nlp and vision apis based in angular2
Stars: ✭ 35 (-10.26%)
Mutual labels:  angular2
react-instagram-zoom-slider
🌄↔️ A slider component with pinch to zoom capabilities inspired by Instagram
Stars: ✭ 67 (+71.79%)
Mutual labels:  carousel
perspectiveapi-authorship-demo
Example code to illustrate how to build an authorship experience using the perspective API
Stars: ✭ 62 (+58.97%)
Mutual labels:  angular2
ng2-visualizejs
A simple demonstration that draws a Jaspersoft report/dashboard resource with Visualize.js library using the Angular Framework (aka Angular 2.0)
Stars: ✭ 16 (-58.97%)
Mutual labels:  angular2
yii2-gallery-widget
BlueImp Gallery Widget for Yii2
Stars: ✭ 60 (+53.85%)
Mutual labels:  carousel
markdown-to-html-pipe
Angular 2 Pipe that transforms a markdown string to HTML
Stars: ✭ 40 (+2.56%)
Mutual labels:  angular2
ng-data-picker
🏄🏼 A data picker based on Angular 4+ (like native datetime picker of iOS)
Stars: ✭ 24 (-38.46%)
Mutual labels:  angular2
Slide
Slide is an open-source, ad-free Reddit browser for Android.
Stars: ✭ 1,733 (+4343.59%)
Mutual labels:  slide
Rmarkdown tutorial
Reproducible Research with Rmarkdown: data management, analysis, and reporting all-in-one
Stars: ✭ 18 (-53.85%)
Mutual labels:  slide

Ng2Carouselamos

Ng2-carouselamos is a simple carousel/slider which just use css transitions to do the work

Demo

Demo

Getting started

  • Install node package:
npm i ng2-carouselamos --save

And then, in your app.module.ts :

import { Ng2CarouselamosModule } from 'ng2-carouselamos';
...
@NgModule({
  ...
  imports: [
    ...
    Ng2CarouselamosModule
  ],
  ...
})

Documentation

ng2-carouselamos - attribute to apply carousel

startAt - initial slide to render. Defaults to 0.

width - size of window to show

items - objects array that belong to the carousel

$item - template for each item

$prev - template for previous button

$next - template for next button

onSelectedItem($event) - event triggered when snap element. $event is an object containing the current item and the current index - { item: ..., index: ... }

Inside $item template we have access to the follow:

  • let-item - the current element of the objects array

  • let-i="index" - current index

Implementing

<div
  ng2-carouselamos
  [width]="500"
  [items]="[
    { name: 'Alice'},
    { name: 'Bob'},
    { name: 'John Doe'},
    { name: 'Jane Doe'}
  ]"
  [$item]="itemTemplate"
  [$prev]="prevTemplate"
  [$next]="nextTemplate"
  (onSelectedItem)="selectedItem = $event.item; selectedIndex = $event.index"
></div>

<div>
  Current item selected <br />
  {{ selectedIndex }} - {{ selectedItem }}
</div>

<ng-template #prevTemplate>
  <span>Previous</span>
</ng-template>

<ng-template #nextTemplate>
  <span>next</span>
</ng-template>

<ng-template let-item let-i="index" #itemTemplate>
  <div style="min-width: 200px">
    <b *ngIf="i === selectedIndex">{{i}}. {{item.name}}</b>
    <span *ngIf="i !== selectedIndex">{{i}}. {{item.name}}</span>
  </div>
</ng-template>

Based on @angular/cli(https://angular.io/guide/creating-libraries)

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].