npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

next-elastic-carousel

v1.0.10

Published

A flexible and responsive carousel component for react

Downloads

127

Readme

Next Elastic Carousel

Next Elastic Carousel uses the base of react-elastic-carousel, where we fixed some known bugs, updated libraries, and added new features. Our goal is to provide a more stable and reliable carousel component for React applications.

Features

  • Improved versioning: Ensuring consistent and predictable updates.
  • Bug fixes: Addressing known issues from the original repository.
  • New name: As the name has been changed to Next Elastic Carousel, it is not compatible with the original React Elastic Carousel, as significant changes have been made to the codebase.

Feel free to contribute by opening issues or submitting pull requests!

Why do we need yet another carousel component

  • Element resize support (true responsiveness) Most of the carousel components are responsive to the viewport size, but this is not a real responsive support as we can have an element with a width:500px on a 1200px screen, most carousel component will "think" we are on a 1200px mode because they "watch" the view-port's size and not the wrapping element's size. This is the reason why react-eleastic-carousel is using the resize-observer which gives us a true responsive support, not matter on what screen size we are.

  • RTL (right-to-left) support Supporting right-to-left languages requires a full support for right-to-left rendering and animations which is not supported in most of the carousel components out there. also, right-to-left support is important and should be a standard for most applications.

Install

npm i next-elastic-carousel

or

yarn add next-elastic-carousel

or

pnpm add next-elastic-carousel

next-elastic-carousel is using the latest version of styled-components for styling. This means that you might need to install it as well:

npm i styled-components

Usage

Note: All tests were conducted on the client side using Next.js 14+. If you have evidence that it works with other versions of React or Next.js, feel free to modify this README.

'use client'

import Carousel from 'next-elastic-carousel'

export default function PageCarousel() {
  const items = [
    { id: 1, title: 'item #1' },
    { id: 2, title: 'item #2' },
    { id: 3, title: 'item #3' },
    { id: 4, title: 'item #4' },
    { id: 5, title: 'item #5' },
  ]

  return (
    <Carousel>
      {items.map((item) => (
        <div key={item.id}>{item.title}</div>
      ))}
    </Carousel>
  )
}

credit

All credit goes to Sagiv Ben Giat and the contributors of react-elastic-carousel.

License

MIT © zeroskullx