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

@carousel-ui/react-spin-carousel-3d

v1.0.18

Published

A 3d Carousel that is built for React

Readme

React Spin Carousel 3D 🎠

The React Spin Carousel 3D is a highly customizable 3D carousel component for React. It allows you to display a collection of items in a visually appealing 3D carousel with smooth transitions and interactive controls. The component supports auto-play, custom radio buttons, smooth animations and multiple display modes("card", "image"). Perfect for showcasing portfolios, products, or image galleries and many more :).

📦 Installation

npm install @carousel-ui/react-spin-carousel-3d
# or
yarn add @carousel-ui/react-spin-carousel-3d

🌟 Features

  • 3D Perspective Effects - Realistic card rotation and depth
  • Dual Display Modes - card (with shadows/borders) and image (seamless) modes
  • Responsive Design - Works on all screen sizes
  • Touch & Drag Support - Mobile-friendly interactions
  • Auto-play - Optional automatic rotation
  • Customizable Navigation - Built-in radio buttons or bring your own
  • TypeScript Support - Fully typed components
  • Performance Optimized - Smooth animations with CSS transforms

Usage

Complete usage Examples

🛠 Props Reference

Core Props

| Prop | Type | Default | Description | | ------------ | --------------------------------------------- | ------------ | ----------------------------- | | data | T[] | Required | Array of items to render | | renderItem | (item: T, index: number) => React.ReactNode | Required | Render function for each item |

Layout & Styling

| Prop | Type | Default | Description | | ----------------- | --------------------- | --------------------- | ---------------------------------- | | width | string \| number | "100vw" | Container width (px or %) | | height | string \| number | 300 | Container height (px or %) | | itemWidth | string \| number | 300 | Individual item width (px or %) | | accentColor | string | "hsl(204, 5%, 38%)" | Color for active states | | backgroundColor | string | "#F5F5F5" | Background color for card mode | | containerStyle | React.CSSProperties | {} | Custom styles for container div | | itemStyle | React.CSSProperties | {} | Custom styles for individual items |

Behavior & Functionality

| Prop | Type | Default | Description | | -------------------- | ---------------------------------- | ------------ | --------------------------------- | | initialActiveIndex | number | Middle index | Starting active item index | | isAutoPlay | boolean | false | Enable automatic rotation | | autoPlayInterval | number | 5000 | Rotation interval in milliseconds | | onItemClick | (item: T, index: number) => void | - | Callback when item is clicked |

Display Mode

| Prop | Type | Default | Description | | --------------- | -------------------------------- | ---------- | ----------------------------------- | | displayMode | "image" \| "card" | "card" | Visual presentation style | | imageFit | "cover" \| "contain" \| "fill" | "cover" | Image scaling behavior (image mode) | | imagePosition | string | "center" | Image positioning (e.g. "top left") |

Navigation Controls

| Prop | Type | Default | Description | | -------------------- | ------------------------------------------------------ | ------- | ---------------------------------- | | showRadioButtons | boolean | true | Show default navigation indicators | | customRadioButtons | (index, isActive, setActiveIndex) => React.ReactNode | - | Custom navigation component | | radioButtonStyle | React.CSSProperties | {} | Styles for default navigation dots |

Advanced Configuration

| Prop | Type | Default | Description | | ----- | -------- | ------- | ------------------------------ | | key | string | - | Unique identifier for carousel |

🎨 Styling Tips

  1. For Cards:

    • Use backgroundColor to set card color
    • Add custom shadows via itemStyle
    itemStyle={{
      boxShadow: "0 10px 20px rgba(0,0,0,0.2)",
      borderRadius: "12px"
    }}
  2. For Images:

    • Set imageFit="contain" for full image visibility
    • Use imagePosition="top" for portrait images

⚠️ Troubleshooting

Issue: Auto-play stops on hover
Solution: This is intentional (UX best practice). Lets the user observe whats inside the card while hovering!

Issue: Radio buttons not properly working when using multiple carousels in same page
Solution: Use unique key on each carousel

Issue: Horizontal scroll appears
Fix: Ensure parent container has overflow-x: hidden

Issue: Items overlapping
Fix: Increase itemWidth or reduce number of items

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check the issues page.

If you'd like to improve this project, please:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/your-feature-name
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/your-feature-name
  5. Open a pull request

We appreciate all kinds of contributions — bug reports, feature ideas, code, and documentation!

Please add tests before submitting a PR!

📜 License

MIT © @carousel-ui