Gathering detailed insights and metrics for vue-simple-svg
Gathering detailed insights and metrics for vue-simple-svg
Gathering detailed insights and metrics for vue-simple-svg
Gathering detailed insights and metrics for vue-simple-svg
A simple Vue.js plugin that allows you to load a SVG image as an inline SVG with an access to change its fill colors
npm install vue-simple-svg
Typescript
Module System
Node Version
NPM Version
72.5
Supply Chain
92.9
Quality
75.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
80 Stars
108 Commits
23 Forks
2 Watchers
22 Branches
5 Contributors
Updated on Jun 24, 2025
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
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
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
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/17 approved changesets -- 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
122 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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