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

vue3-insta-stories

v0.1.0

Published

> A VueJs Plugin for Instagram like stories

Readme

vue3-insta-stories

A VueJs Plugin for Instagram like stories

Demo

This is a demo presentation, feel free to design your stories & slides as you wish.

Wall entry demo

Features

- Responsive component
- Custom design ready 
  - Feel free to design your slides and stories as you wish
- Swipe events
- Scroll top/bottom on big screens (Pc) to go to another story
- Custom duration per each slide
- Built-in actions [Stop,Rest,Play,Previous Story etc.]
- Built-in Event [ended,next_story,next_slide etc.]

You can clone this directory and run the command below to generate a demo Vue 3 project using this plugin!

npm run serve:demo

Dependencies

This plugin uses AnimeJS && HammerJS. Install them using the below commands:

npm i animejs
npm i hammerjs

Installation

npm i vue3-insta-stories

Read before implementation

Stories component is a responsive component, so it should be places inside a container with a specific width and height, and the component will stretch it's self into the parent container.

Implementation

<div class="stories_wrapper">
  <stories
    :autoplay="false"    // Autoplay stories
    :duration="duration" // Default duration per each slide
    :breakpoint='768'    // Mobile breakepoint
    :stories="stories"
    ref="stories_component"
  >
    <template v-slot:slide="{ story, slide }">
      <!-- Inside this template you can desing the slides -->
      <!-- {{ story }} and {{ slide }} objecta are available to you inside this template -->
      <div class="slide" :style="'background-color:' + slide.color">
        <div>
          <p>{{ story.custom_attribute }}</p>
          <p>Color: {{ slide.color }}</p>
        </div>
      </div>
    </template>
  </stories>
</div>

Import Stories component into your preferred component.

In case you want to use the Actions provided by this Component than you also need to import ref from vue;

import Stories from "vue3-insta-stories";
import { ref } from "vue";
export default {
  components: { Stories },
  name: "YourCustomComponent",
  setup() {
    const stories_component = ref(null);

    return {
      stories_component,
    };
  },
  data() {
    return {
      duration: 5000,
      stories: [
        {
          //Add as many custom attributes per story as you like
          custom_attribute: "Story 1",
          slides: [
            { 
              // The attributes below [id,color] are custom attributes 
              // Add the duration attribute in case you want to add a custom duration for this slide
              id: 1, 
              color: "#D53738", 
              duration: 3000 
              },
            { 
              id: 2, 
              color: "#638867", 
              duration: 10000 
            },
          ],
        },
        {
          custom_attribute: "Story 2",
          slides: [
            { 
              id: 3, 
              color: "#DAF7A6" 
            },
          ],
        },
        ...
      ],
    };
  },

Events and How To Use them

1. ended
2. next_story
3. prev_story
4. prev_slide
5. next_slide
<stories
  :autoplay="false"
  :duration="duration"
  :stories="stories"
  ref="stories_component"
  @ended="endedEvent"
  @next_story="nextStoryEvent"
  @prev_story="prevStoryEvent"
  @prev_slide="prevSlideEvent"
  @next_slide="nextSlideEvent"
  @slide_changed="slideChangedEvent"
  @swipe_up="swipe_up"
  @swipe_down="swipe_down"
  @swipe_left="swipe_left"
  @swipe_right="swipe_right"
>
export default {
  methods: {
    //Events
    endedEvent() {
      console.log("endedEvent");
    },
    prevStoryEvent() {
      console.log("prevStoryEvent");
    },
    nextStoryEvent() {
      console.log("nextStoryEvent");
    },
    prevSlideEvent() {
      console.log("prevSlideEvent");
    },
    nextSlideEvent() {
      console.log("nextSlideEvent");
    },
    slideChangedEvent(index){
      console.log("slideChangedEvent: " + index);
    },
    swipe_left() {
      console.log("swipe_left Event");
      this.stories_component.nextStory();
    },
    swipe_right() {
      console.log("swipe_right Event");
      this.stories_component.prevStory();
    },
    swipe_up() {
      console.log("swipe_up Event");
    },
    swipe_down() {
      console.log("swipe_down Event");
      this.stopStory();
      // -- Close slider
    },
  },
  ...

Methods

1. stopStory
2. resetStory
3. playStory
4. prevStory
5. nextStory
6. prevSlide
7. nextSlide
<button class="btn btn-danger" @click="stopStory">Stop</button>
<button class="btn btn-danger" @click="resetStory">Reset</button>
<button class="btn btn-success" @click="playStory">Play</button>
<button class="btn btn-secondary" @click="prevStory">Previous Story</button>
<button class="btn btn-secondary" @click="nextStory">Next Story</button>
<button class="btn btn-secondary" @click="prevSlide">Prev Slide</button>
<button class="btn btn-secondary" @click="nextSlide">Next Slide</button>
<button class="btn btn-secondary" @click="recalculateDimensions">Recalculate Dimensions</button>
export default {
  methods: {
    //Actions
    storyClicked(index) {
      this.stories_component.playStory(index);
    },
    stopStory() {
      this.stories_component.stopStory();
    },
    resetStory() {
      this.stories_component.resetStory();
    },
    playStory() {
      this.stories_component.playStory();
    },
    prevStory() {
      this.stories_component.prevStory();
    },
    nextStory() {
      this.stories_component.nextStory();
    },
    prevSlide() {
      this.stories_component.prevSlide();
    },
    nextSlide() {
      this.stories_component.nextSlide();
    },
    recalculateDimensions(){
      this.stories_component.recalculateDimensions();
    }
  },
  ...