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

@snap-carousel/core

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snap-carousel/core

### Installation

  • 0.0.19-next.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
158
decreased by-38.28%
Maintainers
1
Weekly downloads
 
Created
Source

SimplebarReact

Installation

- Via npm npm install @snap-carousel/core --save

- Via Yarn yarn add @snap-carousel/core

Usage

Check out the Demo project or our live Codesandbox example.

If you are using a module loader (like Webpack) you first need to load SimpleBar:

import { getActiveSnap, scrollTo, dragToScroll } from '@snap-carousel/core';
import '@snap-carousel/core/dist/styles.css';

const root = document.querySelector('.carousel');

const activeSnap = getActiveSnap({
  root,
  onChange: (snapIndex) => {
    console.log('active snap changed to: ', snapIndex);
  },
});

const activeSnapIndex = activeSnap.getActiveIndex();

scrollTo({ root, index: 2, duration: 0 });

Don't forget to import both css and js in your project!

FAQs

Package last updated on 25 Feb 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