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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@rleeson/vue-simple-carousel

v2.0.0

Published

Vue 2.x based carousel with simple features for rotation and accessibility

Readme

Vue Simple Carousel

Vue 2.x compatible carousel, supports modern browsers (no IE support). The carousel is intended to rotate slides, infinitely wrapping from the first to last slide.

Uses and Constraints

The component offers a default set of controls aimed towards accessibility, while providing a variety of slots to customize the appearance and implementation. There are no default CSS styles to override as carousels are implemented in many different layouts. The only bundled dependencies are some Vue Typescript class support libraries and minor bits of RxJS.

The library uses Typescript and implements a main component SimpleCarousel, where the generic type T represents the data model for the slide. The carousel then uses a configuration object CarouselOptions, which is combined with control state data and passed into each control slot as CarouselControls.

While the component itself uses a custom Webpack configuration, an example app using the component is included in mockapp/ which uses the Vue CLI.

Required Properties

  • Slides (slides: Array<T>): set of objects of type T passed into the slide repeater and all control areas

Below is shown an example using a Vue SFC, where the T is defined as MockSlide:

<template>
...
    <SimpleCarousel :configuration="sample_configuration" />
...
</template>
...
<script lang="ts">
...
    get sample_configuration(): CarouselOptions<MockSlide> {
        return <CarouselOptions<MockSlide>>{
            slides: [
                <MockSlide>{
                    cms_classes: "",
                    id: 1,
                    title: "Long article title",
                    subtitle:
                        "More information about this article, a very long article.",
                },
                <MockSlide>{
                    cms_classes: "special-format",
                    id: 2,
                    title: "Medium article title",
                    subtitle:
                        "More information about this article, of medium length.",
                },
                <MockSlide>{
                    cms_classes: "short-format custom-class",
                    id: 3,
                    title: "Medium article title too",
                    subtitle:
                        "More information about this article, of medium length again.",
                },
            ],
        };
    }
...
</script>

Defaults

The other optional configuration elements are as follows:

  • Auto Slide (auto_slide: boolean = true): Set false to disable automatic slide rotation, otherwise rotation occurs
  • Pause Rotation on Control Interaction (pause_on_control_interaction = true): When enabled, control (indicators, next, previous) interaction pauses rotation
  • Skip Link Anchor (control_skip_link_anchor: string = "#main-content"): Anchor link placed before the controls for keyboard and screen reader access to skip the carousel controls to a defined anchor on the page. Set blank to remove the link.
  • Slide Interval: (slide_interval: number = 5000): Time in milliseconds between slide rotations, internally, the component enforces a minimum of 250ms

Examples

Explore the mockapp/ directory to see a basic example with sample slide data, a template to format and display the slide data, and some basic control override examples.

NPM Commands

  • yarn build: Production build
  • yarn development: HMR development version of the library
  • vue serve: Mock application