vue-svg-filler
Vue component for customize your svg file.
Install
Usage
? Please note that !
- Your
svg
file must only contain in/static
directory path
must be full path e.g.static/icon.svg
or/static/icon/file.svg
, Can't use../
or./
Example directory structure
my-project
├── ...
│
├── src
├── static
│ ├── icon
│ │ └── graph.svg
│ ├── account.svg
│ └── alert.svg
│
└── ...
Example
Simple usage

Custom fill & size

Click

Hover

Options
Props
Props | Type | Default | Description |
---|---|---|---|
path | String | - | Path of your svg file in /static |
width | String | 24px | Width |
height | String | 24px | Height |
fill | String | #000 | Fill color |
hover-color | String | - | Fill color when hover on icon |
click | Function | - | Triggers when click |
Events
Name | Type | Description |
---|---|---|
[any].native | event: $event | Listen to any native event, e.g. click.native |