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.
vue3-loader-image
Advanced tools
Vue3 package for showing loader while image loading, with default skeleton
Vue 3 package for showing a loader while an image loading with default using skeleton loader, see video below for demo.
https://github.com/ichsanputr/vue3-image-loader/assets/69036480/4296e70b-8780-41da-9d52-4ed765bfaef6
npm install vue-loader-image
This package support either composition and options api with typescript used.
<script lang="ts">
import VueLoaderImage from 'vue3-loader-image';
import 'vue3-loader-image/dist/style.css'
</script>
Or use option api.
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
components: {
VueLoaderImage
}
})
</script>
We can use delay props to increase the time the image will be displayed, because sometimes the loader doesn't come out because the internet speed is good during the loading process.
<VueLoaderImage delay="4000" src="https://images.unsplash.com/photo-1439066615861-d1af74d74000?q=80&w=1973" width="300px" height="300px"></VueLoaderImage>
That's will be show image after image loaded plus 4 second.
Beside skeleton loader you also can use custom css loader like using slot like this.
<VueLoaderImage delay="4000" src="https://images.unsplash.com/photo-1439066615861-d1af74d74000?q=80&w=1973" width="300px" height="300px">
<div class="loader"/>
</VueLoaderImage>
See more css loader on https://css-loaders.com/.
Attribute | Type | Is Required | Description |
---|---|---|---|
src | String | true | Image source url which will be displayed |
width | String | true | Width of image, accpeting all unit measured (1px, 1rem, 1%, etc) |
height | String | true | Same like width |
delay | String | no | Image will be show after loaded plus delay value |
circle | Boolean | no | Border radius 100% |
pill | String | no | Border radius custom value |
alt | String | no | -- |
crossorigin | String | no | -- |
loading | String, eager or lazy | no | -- |
longdesc | String | no | -- |
FAQs
Vue3 package for showing loader while image loading, with default skeleton
The npm package vue3-loader-image receives a total of 4 weekly downloads. As such, vue3-loader-image popularity was classified as not popular.
We found that vue3-loader-image 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.