New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-spring-pager

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-spring-pager

A ready-to-use one of the best available Animated ViewPagers built using react-spring.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

What is this?

It is an npm package which let's you build an awesome animated viewpager to showcase images. Internally it uses react-spring and react-use-gesture. It is a ready-to-use npm package which you can use anywhere in your website. It adjusts itself based on the parent element.

Installation

npm install react-spring-pager

Usage

You can create viewpager containing images anywhere in your website using this npm package. Make sure on the three most important things given below. Without them, it may not work properly and scalably.

  • Import the SpringPager component as shown in below example.
  • It is suggested that you wrap the SpringPager component inside div, where SpringPager can take the complete height and width of that div. You can resize parent div as you want.
  • It is mandatory to provide id of the parent div as prop in SpringPager component.

Example

import SpringPager from 'react-spring-pager';
...

const images = [
    // Provide URLs of Images that you want to display in Viewpager.
];

function App(props){
    return (
        ...
        <div id="viewpager_id">
            <SpringPager pages={images} parent_id={"viewpager_id"} />
        </div>
        ...
    );
}

Options

Component SpringPager has two mandatory options pages and parent_id. The descriptions about which are given below.

  • pages: List of URLs of images that you want to display in Viewpager.
  • parent_id: ID of parent element of SpringPager.

About Creator

Developed by Ashutosh Hathidara.

Keywords

FAQs

Package last updated on 10 Nov 2020

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