šŸš€ Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@corex/use-swiper

Package Overview
Dependencies
Maintainers
1
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@corex/use-swiper

--- title: '@corex/use-swiper' custom_edit_url: 'https://github.com/iamvishnusankar/corex/edit/master/packages/use-swiper/README.md' ---

Source
npmnpm
Version
4.0.11
Version published
Weekly downloads
331
70.62%
Maintainers
1
Weekly downloads
Ā 
Created
Source

title: '@corex/use-swiper' custom_edit_url: 'https://github.com/iamvishnusankar/corex/edit/master/packages/use-swiper/README.md'

Example Usage

import React from 'react'
import useSwiper from '@corex/use-swiper'

const CustomCarousel = () => {
  const containerRef = React.useRef()

  useSwiper(containerRef, {
    direction: 'horizontal',
    loop: true,
  })

  return (
    <div className="swiper-container" ref={containerRef}>
      <div className="swiper-wrapper">
        {[0, 1, 2, 3, 4].map((_, index) => (
          <div key={index}>Slide {index}</div>
        ))}
      </div>
      <div className="swiper-pagination" />
    </div>
  )
}

export default CustomCarousel

Keywords

react

FAQs

Package last updated on 31 May 2022

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