Socket
Socket
Sign inDemoInstall

@developerx167/infinite-right-carousel

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @developerx167/infinite-right-carousel

infinite right carousel blur effect responsive


Version published
Maintainers
1
Created

Readme

Source

Example:

import React from "react";
import { useRef } from "react";
import Carousel from "./lib/Carousel.js";


function App() {

  const cRef = useRef()
  const prev = useRef()
  const next = useRef()

  return (
    <section>
            // previous button
            <button ref={prev} onClick={()=>cRef.current.prev()} style={{borderRadius : "50%"}}>prev</button>
            // carousel
            <Carousel
                prev={prev}
                next={next}
                ref={cRef}
                ms={3000}
                width={4}
                sideBlurColor="white">
                // items
                <div className={"container"} style={{  height : "30vw", width : "30vw", margin : `0 max(.5rem,.5vw)`,}}>1</div>
                <div className={"container"} style={{  height : "30vw", width : "30vw", margin : `0 max(.5rem,.5vw)`,}}>2</div>
                <div className={"container"} style={{  height : "30vw", width : "30vw", margin : `0 max(.5rem,.5vw)`,}}>3</div>
                <div className={"container"} style={{  height : "30vw", width : "30vw", margin : `0 max(.5rem,.5vw)`,}}>4</div>
            </Carousel>
            // next button
            <button ref={next} onClick={()=>cRef.current.next()} style={{borderRadius : "50%"}}>next</button>
            
            // change width and sideBlurColor color on click
            <button onClick={()=>{
            cRef.current.width(1)
            cRef.current.sideBlurColor("")
            }}>change width</button>
    </section>
  );
}

export default App;

FAQs

Last updated on 09 Jul 2022

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