Gathering detailed insights and metrics for vue-simple-svg
Gathering detailed insights and metrics for vue-simple-svg
npm install vue-simple-svg
Typescript
Module System
Node Version
NPM Version
76.6
Supply Chain
93.5
Quality
75.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
557,287
Last Day
220
Last Week
1,687
Last Month
8,075
Last Year
75,314
MIT License
79 Stars
108 Commits
23 Forks
3 Watchers
22 Branches
5 Contributors
Updated on Jan 18, 2025
Minified
Minified + Gzipped
Latest Version
2.0.2
Package Id
vue-simple-svg@2.0.2
Unpacked Size
53.38 kB
Size
24.36 kB
File Count
30
NPM Version
6.11.3
Node Version
9.11.2
Cumulative downloads
Total Downloads
Last Day
-66%
220
Compared to previous day
Last Week
-24%
1,687
Compared to previous week
Last Month
66.1%
8,075
Compared to previous month
Last Year
2.4%
75,314
Compared to previous year
1
45
A simple Vue.js plugin that allows you to use a component that dynamically loads a .svg file as an inline SVG so you can easily control its style programmatically. No jQuery required.
I recommend using vue-svg-loader for many cases when you just need to load a SVG file as a component. This plugin is built to cover some other cases the library doesn't fit, which are:
1$ npm install vue-simple-svg
1// as a plugin 2import VueSimpleSVG from 'vue-simple-svg' 3Vue.use(VueSimpleSVG) 4 5// or as a component 6import {SimpleSVG} from 'vue-simple-svg' 7Vue.component('simple-svg', SimpleSVG)
1<svg xmlns="http://www.w3.org/2000/svg"> 2 <g> 3 <path class="fill-to-change" d="XXXXX XXXXX XXXXX" /> 4 <path class="stroke-to-change" d="XXXXX XXXXX XXXXX" /> 5 </g> 6</svg>
1<simple-svg 2 :src="svgSrc" 3 fill-class-name="fill-to-change" 4 :fill="svgFillColor" 5 stroke-class-name="stroke-to-change" 6 :stroke="svgFillColor" 7 width="100%" 8 height="100%" 9 custom-id="my-id" 10 custom-class-name="my-class" 11 @load="svgLoaded()" 12/>
props | type | description | default |
---|---|---|---|
src | string | path to your SVG file | *required |
fillClassName | string | class name set to the elements in your SVG file whose fill color you want to change | '' |
fill | string | CSS-valid fill color value | '' |
strokeClassName | string | class name set to the elements in your SVG file whose stroke color you want to change | '' |
stroke | string | CSS-valid stroke color value | '' |
width | string | root SVG element's style width | 'auto' |
height | string | root SVG element's style height | 'auto' |
customId | string | root SVG element's id | '' |
customClassName | string | root SVG element's class | '' |
events | description |
---|---|
@load | called when the inline SVG is generated |
To run demo in your local environment,
1$ npm run dev-demo
You can see the example of how to use simple-svg component at demo/components/SvgButton.vue
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/17 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
118 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More