Skip to content

kennerluoma/ember-cli-swiper

 
 

Repository files navigation

Ember-cli-swiper Build Status Ember Observer Score Code Climate

Simple ember-wrapper around Swiper by idangerous.

See the demo for examples and usage-infos.

Compatibility

  • Ember.js v3.24 or above
  • Ember CLI v3.24 or above
  • Node.js v14 or above

Installation

ember install ember-cli-swiper

Usage

{{#swiper-container}}
  {{#swiper-slide}}Slide 1{{/swiper-slide}}
  {{#swiper-slide}}Slide 2{{/swiper-slide}}
  {{#swiper-slide}}Slide 3{{/swiper-slide}}
  {{#swiper-slide}}Slide 4{{/swiper-slide}}
  {{#swiper-slide}}Slide 5{{/swiper-slide}}
{{/swiper-container}}

Options

All available Swiper options are supported and can be configured two ways:

As top level attributes:

{{swiper-container freeMode=true}}

As a hash of options:

// In controller
Controller.extend({
  myOptions: { parallax: true }
});

{{swiper-container options=myOptions}}

Events

All Swiper events are configured as an events action map like so:

{{swiper-container events=(hash click=(action "myClickHandler"))}}

Please note that attribute values will overwrite any conflicting options.

Running tests

ember test

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Packages

No packages published

Languages

  • JavaScript 70.5%
  • Handlebars 22.7%
  • HTML 4.3%
  • CSS 2.5%