
Research
Malicious npm Package Brand-Squats TanStack to Exfiltrate Environment Variables
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.
vue-it-bigger
Advanced tools
A simple image / (YouTube) video lightbox component for Vue 3.
Click on the screenshot above for a demo.
You know the drill:
npm install vue-it-bigger
# or
yarn add vue-it-bigger
You can view App.vue or the demo for an usage example.
In the <script> section of your component import it:
import LightBox from 'vue-it-bigger'
import 'vue-it-bigger/dist/vue-it-bigger.css'
Add it to the list of used components:
export default {
components: {
LightBox,
},
}
And use it in the <template> section:
<LightBox :media="media"></LightBox>
The media prop has the following structure:
[
{ // For an image
type: 'image', // Can be omitted for image
thumb: 'http://example.com/thumb.jpg',
src: 'http://example.com/image.jpg',
caption: 'Caption to display. HTML <b>enabled</b>', // Optional
srcset: '...' // Optional for displaying responsive images
},
{ // For a YouTube video
type: 'youtube',
thumb: 'https://img.youtube.com/vi/WsptdUFthWI/hqdefault.jpg',
id: 'WsptdUFthWI',
caption: 'HTML <b>enabled</b> caption to display' // Optional
},
{ // For a video that can be played in the <video> tag
type: 'video',
thumb: 'https://s3-us-west-1.amazonaws.com/powr/defaults/image-slider2.jpg',
sources: [
{
src: 'https://www.w3schools.com/html/mov_bbb.mp4',
type: 'video/mp4'
}
],
caption: '<h4>Monsters Inc.</h4>',
width: 800, // Required
height: 600, // Required
autoplay: true // Optional: Autoplay video when the lightbox opens
}
]
| name | type | default | description |
|---|---|---|---|
| media | Array | required | Media array to display |
| showLightBox | Boolean | true | Whether to show lightbox or not at the beginning |
| startAt | Number | 0 | Index of the image that you want to start at |
| nThumbs | Number | 7 | Number of thumbnail images |
| showThumbs | Boolean | true | Whether to show thumbnails or not |
| autoPlay | Boolean | false | Move to next image automatically |
| autoPlayTime | Number | 3000 (ms) | Time to stop at an image before move on to next image |
| interfaceHideTime | Number | 3000 (ms) | Time after which the interface is hidden |
| showCaption | Boolean | false | Whether to show caption or not |
| disableScroll | Boolean | true | set to true to avoid scrolling views behind lightbox |
| lengthToLoadMore | Number | 0 | Minimum length unto end to emit load more event |
| closable | Boolean | true | Display the close button at the right top corner or not. ESC clicking-close will also be disabled if closable is set to false. |
| closeText | String | Close (Esc) | Text for the close button |
| previousText | String | Previous | Text for the previous image button |
| nextText | String | Next | Text for the next image button |
| name | arguments | description |
|---|---|---|
| nextImage | () | Move to next image |
| previousImage | () | Move to previous image |
| closeLightBox | () | Close lightbox |
| showImage | (index) | Show the image at index |
The content of the close button.
The content of the footer under the image.
| name | type | description |
|---|---|---|
| current | integer | Number of the current image displayed |
| total | integer | Number of images |
The previous button on the main image.
The next button on the main image.
The caption of the current image.
| name | type | description |
|---|---|---|
| currentMedia | Object | The currently displayed object from the media array |
Usage example:
<LightBox
ref="customCaptionLightbox"
:media="media"
:show-caption="true"
>
<template v-slot:customCaption="slotProps">
{{ slotProps.currentMedia.caption }}<br>
There could be some description here.
</template>
</LightBox>
The Icon used for videos
onOpened: Emit when the lightbox is opened.onClosed: Emit when the lightbox is closed.onLastIndex: Emit when the current image is the last one of the list.onFirstIndex: Emit when the current image is the first one of the list.onStartIndex: Emit when the current image is at the startAt index (specified in the properties).onLoad: Emit when there are lengthToLoadMore images left in the array (specified in the properties). For example, if lengthToLoadMore = 2 and there are 7 images in your array, when you reach index 4 (which means there are 2 images left which are not discovered yet), this event will be emitted. After that, if the image array are updated and there are totally 15 images, the event will be emitted at index 12.Clone the repository, cd into it and run:
yarn install
yarn dev
The demo app will be available at http://localhost:1805
After you add or modify something make sure the tests still pass:
yarn test
yarn lint
To build the library:
yarn build
yarn dev, yarn build, and yarn testThe publish workflow will automatically validate that the release tag matches the version in package.json and that CHANGELOG.md has an entry for the version, then build and publish to npm.
This project is licensed under the the Apache License, Version 2.0.
FAQs
A simple image / (YouTube) video lightbox component for Vue.js.
We found that vue-it-bigger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.