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

keen-slider

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keen-slider

The HTML touch slider carousel with the most native feeling you will get.

  • 6.8.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is keen-slider?

keen-slider is a lightweight, responsive, and touch-enabled slider library for creating carousels and sliders in web applications. It is highly customizable and supports various features such as navigation, autoplay, and different types of animations.

What are keen-slider's main functionalities?

Basic Slider

This code initializes a basic slider on an element with the ID 'my-slider'.

const slider = new KeenSlider('#my-slider');

Navigation

This code initializes a slider with looping enabled and adds event listeners to 'prev' and 'next' buttons to navigate through the slides.

const slider = new KeenSlider('#my-slider', { loop: true });
document.getElementById('prev').addEventListener('click', () => slider.prev());
document.getElementById('next').addEventListener('click', () => slider.next());

Autoplay

This code initializes a slider with looping enabled and sets it to autoplay with a duration of 2000 milliseconds between slides.

const slider = new KeenSlider('#my-slider', { loop: true, duration: 2000 });

Responsive Design

This code initializes a slider that adjusts the number of slides visible based on the screen width, making it responsive.

const slider = new KeenSlider('#my-slider', { breakpoints: { '(min-width: 768px)': { slidesPerView: 2 }, '(min-width: 1024px)': { slidesPerView: 3 } } });

Other packages similar to keen-slider

Keywords

FAQs

Package last updated on 05 Jul 2023

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