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 🙏

© 2026 – Pkg Stats / Ryan Hefner

styled-components-carousel

v0.2.0

Published

A simple React Carousel component written in Typescript and built with [styled-components](https://github.com/styled-components/styled-components) using React Hooks.

Readme

Styled Components Carousel

A simple React Carousel component written in Typescript and built with styled-components using React Hooks.

Heavily inspired by react-slick with a simplified API and small behaviour changes.

Alt Text

Getting Started

Prerequisites

This component expects that you will have the following packages installed:

Installation

NPM

npm install styled-components-carousel

Yarn

yarn add styled-components-carousel

Examples

Basic Usage

import Carousel from 'styled-components-carousel';

const Example = () => (
    <Carousel
        center
        infinite
        showArrows
        showIndicator
        slidesToShow={3}
    >
        <div>
            <span>1</span>
        </div>
        <div>
            <span>2</span>
        </div>
        <div>
            <span>3</span>
        </div>
    </Carousel>
);

Breakpoints Usage

You can define custom settings per breakpoint for truly responsive behaviour.

import Carousel from 'styled-components-carousel';

const Example = () => (
    <Carousel
        slidesToShow={3}
        center
        centerPadding={30}
        breakpoints={[
            {
                size: 200,
                settings: {
                    slidesToShow: 1,
                    showArrows: false,
                    showIndicator: false,
                    swipeable: true,
                },
            },
            {
                size: 600,
                settings: {
                    slidesToShow: 3,
                    showArrows: false,
                    showIndicator: true,
                    swipeable: true,
                },
            },
            {
                size: 1000,
                settings: {
                    slidesToShow: 4,
                    showArrows: true,
                    showIndicator: true,
                    center: true,
                    swipeable: true,
                },
            },
        ]}
    >
        <div>
            <span>1</span>
        </div>
        <div>
            <span>2</span>
        </div>
        <div>
            <span>3</span>
        </div>
    </Carousel>
);

Props

| Prop | Type | Required | Description | Default | | ------------- | ------ |:--------:| ---------------------------------------- |:-------:| | center | boolean | No | Should the items be centered? | False | | infinite | boolean | No | Should the carousel infinitely scroll the items | False | | showIndicator | boolean | No | Should the bottom item indicator be shown? | True | | showArrows | boolean | No | Should the side navigation arrows be shown? | True | | swipeable | boolean | No | Is the carousel swipeable? | True | | debug | boolean | No | A dev helper prop for debugging development | False | | slidesToShow | number | No | The number of slides to show at once. | 1 | | scaleOnFocus | number | No | How much should the focused item scale? | 1 | | centerPadding | number | No | Used in conjunction with center property to adding padding to center card | 0 | | breakpoints | array | No | An array of settings in order to have responsive behaviour for different screen sizes | undefined |

Development

Storybook

yarn storybook

Run tests

yarn test

Build

yarn build

RoadMap (open to feature requests)

  • Accessibility support
  • Custom slide animation
  • Custom arrow component
  • Custom indicator component
  • Vertical track