Socket
Socket
Sign inDemoInstall

hooper

Package Overview
Dependencies
0
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hooper

A customizable accessible carousel slider optimized for Vue


Version published
Weekly downloads
11K
decreased by-14.74%
Maintainers
2
Install size
92.4 kB
Created
Weekly downloads
 

Readme

Source

leaps logo

Average time to resolve an issue Percentage of issues still open npm npm

Hooper

Vue.js carousel component, optimized to work with Vue.

Features

  • Easily customizable through rich API and addons.
  • Touch, Keyboard, Mouse Wheel, and Navigation support.
  • Two way control carousels (sync).
  • Full RTL layout support.
  • Supports vertical sliding.
  • Responsive breakpoints.
  • Seamless infinite scroll.
  • Accessible by providing a robust structure and user control.
  • Optimized to work with Vue framework.
  • SSR Support.

Browser Support

ChromeFirefoxSafariOperaEdgeIE
Latest ✔Latest ✔Latest ✔Latest ✔Latest ✔11 ✔

Getting started

Installation

First step is to install it using yarn or npm:

npm install hooper

# or use yarn
yarn add hooper

Use Hooper

<template>
  <hooper>
    <slide>
      slide 1
    </slide>
    <slide>
      slide 2
    </slide>
    ...
  </hooper>
</template>

<script>
  import { Hooper, Slide } from 'hooper';
  import 'hooper/dist/hooper.css';

  export default {
    name: 'App',
    components: {
      Hooper,
      Slide
    }
  }
</script>

If you are using PurgeCSS, make sure to whitelist hooper css When importing hooper/dist/hooper.css.

more info at Documentation

Available Props

PropDefaultDescription
itemsToShow1count of items to showed per view (can be a fraction).
itemsToSlide1count of items to slide when use navigation buttons.
initialSlide0index number of initial slide.
infiniteScrollfalseenable infinite scrolling mode.
centerModefalseenable center mode.
verticalfalseenable vertical sliding mode.
rtlnullenable rtl mode.
mouseDragtruetoggle mouse dragging.
touchDragtruetoggle touch dragging.
wheelControltruetoggle mouse wheel sliding.
keysControltruetoggle keyboard control.
shortDragtrueenable any move to commit a slide.
autoPlayfalseenable auto sliding to carousel.
playSpeed2000speed of auto play to trigger slide in ms.
transition300sliding transition time in ms.
sync''sync two carousels to slide together.
hoverPausetruepause autoPlay if the mouse enters the slide.
trimWhiteSpacefalselimit carousel to slide only when there will be no completely empty slide-space.
settings{ }an object to pass all settings.

Available CSS Properties

Please also look at the source to style the slider. An initial style can be imported as @import '~hooper/dist/hooper.css';

ClassPropertyDefaultDescription
hooperheight200pxthe default height of the slider, set to auto to scale with content

FAQs

Last updated on 12 Aug 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc