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

react-spring-universal-carousel

v1.1.0

Published

The world's first responsive carousel that can be server side rendered

Downloads

8

Readme

react-spring-universal-carousel

Introduction

This is a no-frills carousel that can be server side rendered. If you happen upon another reach carousel component that can be server side rendered without any "layout shift" please let us know (open an issue), and we will add a comparison to it.

// TODO: comparison matrix with nuka-carousel and others

Also it uses react-spring for silky smooth drag animations. Furthermore, if you are already using react-spring, then the incremental weight of this library is negligible.

// TODO: library size comparison when react-spring is an existing dependency and not.

Examples

Both of these examples use NextJS for easy server side rendering.

Quick Start

Inside your React project directory, run the following:

yarn add react-spring-universal-carousel

Or with npm:

npm install react-spring-universal-carousel

Carousel

NOTE: It is well-advised to first style your carousel without the Carousel component. Wrap your row of items in a div with overflow: scroll to see that it behaves.

<div style={{ overflowX: 'scroll'}}>
  <Row />
</div>

Once you've done that, just replace the wrapping div with the Carousel component:

import Carousel from 'react-spring-universal-carousel'

function Page() {
  return (
    <Carousel>
      <Row />
    </Carousel>
  )
}

That's all there is to it. Holler if you have questions or encounter bugs!