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

vue-carousel-3d

v2.1.1

Published

Beautiful, flexible and touch supported 3D Carousel for Vue.js

Readme

Vue Carousel 3D

CI npm version npm downloads license

A compact, flexible and touch-friendly 3D carousel for Vue 3.

2.x supports Vue ^3.5.0. Existing Vue 2 users should remain on vue-carousel-3d@1.

Features

  • Real 3D composition: perspective, spacing, inverse scaling and directional bias.
  • Pointer, touch, mouse and keyboard navigation with native, accessible buttons.
  • Optional navigation dots (dots) with aria-current state.
  • Custom control content through prev / next slots.
  • beforeSlideChange guard to block navigation, and one-directional / loop modes.
  • Autoplay with hover pause, and lazy slide content for image-heavy carousels.
  • SSR-safe module, TypeScript declarations and ESM / CommonJS / UMD outputs.

Installation

pnpm add vue-carousel-3d
npm install vue-carousel-3d

Quick start

<template>
  <carousel-3d dots controls-visible aria-label="Featured projects">
    <slide v-for="(project, index) in projects" :key="project.id" :index="index">
      <img :src="project.image" :alt="project.title">
    </slide>
  </carousel-3d>
</template>

<script setup>
import { Carousel3d, Slide } from 'vue-carousel-3d'

const projects = [
  { id: 1, title: 'Orbit', image: '/images/orbit.jpg' },
  { id: 2, title: 'Depth', image: '/images/depth.jpg' }
]
</script>

Each slide needs a stable, zero-based index. For dynamic collections, also pass :count="projects.length" so the carousel recomputes its layout immediately.

Local registration

<template>
  <carousel-3d controls-visible aria-label="Featured projects">
    <slide v-for="(project, index) in projects" :key="project.id" :index="index">
      {{ project.title }}
    </slide>
  </carousel-3d>
</template>

<script>
import { Carousel3d, Slide } from 'vue-carousel-3d'

export default {
  components: { Carousel3d, Slide },
  data: () => ({ projects: [] })
}
</script>

Each slide needs a stable, zero-based index. For dynamic collections, also pass :count="projects.length" to the carousel.

Global registration

import { createApp } from 'vue'
import Carousel3d from 'vue-carousel-3d'

createApp(App).use(Carousel3d)

This registers <carousel-3d> and <slide> globally.

Common patterns

Navigation dots and custom controls

<carousel-3d dots controls-visible>
  <template #prev>
    <span aria-hidden="true">&larr;</span>
  </template>
  <template #next>
    <span aria-hidden="true">&rarr;</span>
  </template>
  <slide v-for="(item, index) in items" :key="item.id" :index="index">
    {{ item.title }}
  </slide>
</carousel-3d>

Blocking navigation

<carousel-3d :before-slide-change="(index) => index !== 3">
  <!-- slides -->
</carousel-3d>

Returning false cancels the move for arrows, swipes, dots and programmatic navigation. @before-slide-change still fires for allowed moves.

Lazy slide content

<carousel-3d lazy :display="3" :count="items.length">
  <slide v-for="(item, index) in items" :key="item.id" :index="index">
    <img :src="item.image" :alt="item.title">
  </slide>
</carousel-3d>

Programmatic navigation

<carousel-3d ref="carousel">
  <!-- slides -->
</carousel-3d>

<button type="button" @click="$refs.carousel.goSlide(3)">
  Open slide 4
</button>

API overview

| Prop | Purpose | | --- | --- | | display / width / height / space | Visible slide count and geometry. | | perspective / inverseScaling / bias | 3D depth and composition. | | controlsVisible / controlsPrevHtml / controlsNextHtml | Built-in controls. | | dots / dotsPosition | Navigation dots (bottom / top). | | autoplay / autoplayTimeout / autoplayHoverPause | Automatic rotation. | | loop / oneDirectional / startIndex | Navigation behavior. | | clickable / disable3d / minSwipeDistance | Interaction and flat mode. | | lazy | Render slide content only near the current slide. | | beforeSlideChange | Return false to cancel a navigation. |

Events: before-slide-change, after-slide-change, last-slide. Methods: goNext(), goPrev(), goSlide(index), goFar(index). See the full API reference for details.

When to use it

This component is a good fit when you want a distinctive 3D stack and need touch handling, keyboard support and SSR safety without building the math yourself.

Carousels can hurt readability, so use autoplay sparingly and always provide a way to pause or navigate manually. Consider a plain grid or a flat carousel (disable-3d) when motion is a concern.

Browser support

Modern evergreen browsers (current Chrome, Firefox, Safari and Edge). IE11 and older engines are not supported.

Development

pnpm install
pnpm dev

Useful checks:

pnpm lint
pnpm test
pnpm build
pnpm docs:build
pnpm pack:check

Node 20.19+ or 22.13+ and pnpm 10.34.5 are supported by the maintenance toolchain.

License

MIT