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

react-swipeable-views-utils

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-swipeable-views-utils

react-swipeable-views utility modules

  • 0.14.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is react-swipeable-views-utils?

The react-swipeable-views-utils package provides additional utilities for the react-swipeable-views library, which allows for the creation of swipeable views in React applications. These utilities enhance the functionality of swipeable views by offering features such as virtualized lists and auto-play capabilities.

What are react-swipeable-views-utils's main functionalities?

AutoPlay

The AutoPlay utility enhances SwipeableViews by adding auto-play functionality, allowing the views to automatically transition between slides at a specified interval.

import { autoPlay } from 'react-swipeable-views-utils';
import SwipeableViews from 'react-swipeable-views';

const AutoPlaySwipeableViews = autoPlay(SwipeableViews);

function MyComponent() {
  return (
    <AutoPlaySwipeableViews>
      <div>Slide 1</div>
      <div>Slide 2</div>
      <div>Slide 3</div>
    </AutoPlaySwipeableViews>
  );
}

Virtualize

The Virtualize utility allows for the creation of virtualized swipeable views, which can improve performance by only rendering the slides that are currently visible.

import { virtualize } from 'react-swipeable-views-utils';
import SwipeableViews from 'react-swipeable-views';

const VirtualizeSwipeableViews = virtualize(SwipeableViews);

function slideRenderer(params) {
  const { index, key } = params;
  return <div key={key}>Slide {index}</div>;
}

function MyComponent() {
  return (
    <VirtualizeSwipeableViews slideRenderer={slideRenderer} />
  );
}

Other packages similar to react-swipeable-views-utils

FAQs

Package last updated on 30 May 2021

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