Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
vue-3-fullscreen-image-directive-plugin
Advanced tools
Vue 3 plugin to open an image in a modal on click
A lightweight Vue.js plugin for creating a fullscreen image modal with customizable options, that support panorama display.
Lightweight: Our package is designed to be minimalistic and efficient, ensuring a small footprint without compromising functionality.
Panorama Support: Now supports panorama images! Pass an array of imageUrl
to create a panorama view.
Accessible: We prioritize accessibility to ensure that our package can be easily used by everyone, including users with disabilities.
Abundant Options: With a plethora of customizable options, you have the flexibility to tailor the package to suit your specific needs. Explore the extensive set of features to enhance your development experience.
Responsive: Our package is built to be responsive, adapting seamlessly to various screen sizes and devices.
Install the package using npm:
npm install vue-3-fullscreen-image-directive-plugin
yarn add vue-3-fullscreen-image-directive-plugin
import { createApp } from 'vue'
import App from './App.vue'
import { fullscreenImagePlugin } from './fullscreen-image-plugin'
import 'vue-3-fullscreen-image-directive-plugin/style.css' // Don't forget to import the style
createApp(App).use(fullscreenImagePlugin).mount('#app')
Add the v-fullscreen-image directive to any element you want to trigger the fullscreen image modal on click.
<template>
<img v-fullscreen-image="{
imageUrl: 'https://placehold.co/2000x4000',
withDownload: false,
animation: 'blur'
}"
src="https://placehold.co/200x400"
/>
</template>
<template>
<img v-fullscreen-image="{
imageUrl: ['https://placehold.co/2000x4000', 'https://placehold.co/1100x1100'],
withDownload: true,
animation: 'blur',
}"
src="https://placehold.co/200x400"
/>
</template>
Name | Type | Description |
---|---|---|
imageUrl | (string, required) | The URL of the image to display |
anchor | (string, optional, default: 'body') | Selector for the element to which the modal will be mounted. |
animation | (string, optional, default: 'fade') | Animation type ('fade', 'blur', 'none'). |
imageAlt | (string, optional) | Alt text for the image. |
withDownload | (boolean, optional, default: true) | Show the download button. |
withClose | (boolean, optional, default: true) | Show the close button. |
withFocusOnClose | (boolean, optional, default: true) | Automatically focus on the close button when the modal opens. |
withCloseOnEscape | (boolean, optional, default: true) | Close the modal when the 'Escape' key is pressed. |
closeOnClickOutside | (boolean, optional, default: true) | Close the modal when clicking outside the image. |
maxHeight | (string, optional, default: '80vh') | Maximum height of the image container. |
maxWidth | (string, optional, default: '80vw') | Maximum width of the image container. |
backdropColor | (string, optional, default: 'rgba(0, 0, 0, 0.7)') | Color of the modal backdrop. |
This npm package is developed and maintained by Anatole Acqueberge, feel free to contibute.
This project is licensed under the MIT License
FAQs
Vue 3 plugin to open an image in a modal on click
The npm package vue-3-fullscreen-image-directive-plugin receives a total of 21 weekly downloads. As such, vue-3-fullscreen-image-directive-plugin popularity was classified as not popular.
We found that vue-3-fullscreen-image-directive-plugin 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.