🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ember-carousel

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-carousel

An Ember Carousel component

0.1.0
latest
Source
npm
Version published
Weekly downloads
35
34.62%
Maintainers
2
Weekly downloads
 
Created
Source

An ember addon for Carousel component

DEMO

Usage

From within your Ember CLI application, run the following:

ember install ember-carousel

Add invoke the component as follows

{{#carousel-container transitionInterval=400 as |ui controls|}}
  <div class="carousel-body">
    {{#ui.item}}
      Emberjs
    {{/ui.item}}
    {{#ui.item}}
      Reactjs
    {{/ui.item}}
    {{#ui.item}}
      Angularjs
    {{/ui.item}}
  </div>

  <button onclick={{controls.previous}}>
    Slide Left
  </button>
  <button onclick={{controls.next}}>
    Slide Right
  </button>
{{/carousel-container}}

API

This is the primary component to start displaying carousel items.

Attributes

  • transitionInterval - Defaults to 500.
  • onSlide - Optional, an action that receives one parameter, an object like { index: 3, previousIndex: 2, direction: 'right' }.
    Triggered before the transition is completed.

Yielded Params

This component yields two hashes, e.g. {{#carousel-container as |ui act|}}. These parameters ui and act can be called anything, but they contain the following items:

  • ui - is a hash with the following component items:
    • item - A component that should contain your slide contents, used like so {{ui.item}}you content{{/ui.item}}.
  • controls - is a hash with the following action items:
    • previous - A closure action that changes to the previous slide.
    • next - A closure action that changes to the next slide.

Development

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Keywords

ember-addon

FAQs

Package last updated on 01 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts