New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-insta-stories

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-insta-stories

Vue component for Instagram stories

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
127
decreased by-55.9%
Maintainers
2
Weekly downloads
 
Created
Source

Simple usage

<template>
  <Stories :stories="items" />
</template>

<script>
import { Stories } from "vue-insta-stories";
export default {
  components: { Stories },
  data: () => ({
    items: [
      "https://picsum.photos/350/200/",
      "https://picsum.photos/400/201/",
      {
        url: "https://file-examples-com.github.io/5mb.mp4",
        type: "video",
      },
    ]
  })
};
</script>

Props

PropertyTypeDefaultDescription
stories[String/Object]requiredAn array of image urls or array of story objects (more info below)
intervalNumber2000Story duration in milliseconds
isPausedBooleanfalseToggle the playing state
currentIndexNumber0Set the current story index
Events
onStoryStartFunction(Number)-Callback when a story starts
onStoryEndFunction(Number)-Callback when a story ends
onAllStoriesEndFunction()-Callback when all stories in the array have ended

Story Object

PropertyDescription
urlThe url of the resource, image or video.
typeOptional. Type of the story. 'image'|'video'
durationOptional. Duration for which a story should persist.
templateOptional. Renders story in a different template see more below.

With header

<template>
  <Stories :stories="items">
    <template #header>
      <story-header />
    </template>
  </Stories>
</template>

<script>
import { Stories } from "vue-insta-stories";
export default {
  components: { Stories },
  data: () => ({
    items: [ "https://picsum.photos/350/200/"]
  })
};
</script>

With custom slot

<template>
  <Stories :stories="items">
    <template #pool="{story}">
        <pool-story :story="story" class="flex-grow"></pool-story>
    </template>
  </Stories>
</template>

<script>
import { Stories } from "vue-insta-stories";
export default {
  components: { Stories },
  data: () => ({
    items: [{ poolId: 23, template: "pool" }]
  })
};
</script>

Keywords

FAQs

Package last updated on 23 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc