vuejs-feather
An easy-to-use svg-sprites wrapper for vue
Install
yarn add vuejs-feather
Usage
; Vue;// you can also pass an option object with custom name and/or svg-spriteVue;
then do
or or if you specified 'as' in options above, you can do or you can specify sprite src inline also, like so:
Sizes
By default, icons will be sized based on the current element's font-size (or propagated parent font-size) Simply set the icon font-size as desired (either by adding css or styling directly)
vuejs-feather
ships with some default classes (for size), you can apply like so:
<!-- font-size: 0.5rem --><!-- font-size: 0.7rem --><!-- font-size: 1.5rem --><!-- font-size: 2rem --><!-- font-size: 4rem -->
Colors
By default, icons will take the parent's color
, you can override this by simply adding a color class or (size), like so:
<!-- font-size: 0.5rem -->
then define .blue-icon
class
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
vuejs-feather © damafeez, Released under the MIT License.
Authored and maintained by damafeez with help from contributors (list).