Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

swiper-slides

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swiper-slides

An ember component that wraps swipe navigation and query param management.

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

swiper-slides

swiper-slides is an ember addon that combines Swiper.js swipe navigation and query param management in a single component. Simply define an appropriate param in a given controller and you're good to go!

Installation

  • npm install
  • ember g swiper-slides

Getting Started

Given the following markup:

{{#swiper-slides options=swiperOptions param=slide}}
  <div class='swiper-slide'>
    one
  </div>
  <div class='swiper-slide'>
    two
  </div>
  <div class='swiper-slide'>
    three
  </div>
{{/swiper-slides}}

We can initialize our swiper instance with the following code in our controller:

import Ember from 'ember';

export default Ember.Controller.extend({
  queryParams: ['slide'],
  slide: null,

  swiperOptions: {
    initialSlide: 1
  }
});

This will give us a swiper instance managed by the 'slide' query param. Whenever the slide changes the component will update the query param with the index of the current slide. Refreshing the page will bring you back to that same slide.

Keywords

FAQs

Package last updated on 18 May 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc