Riot.js SVG Sprite Component
Installation
npm ins riot-ss --save-dev
Import script
Webpack or Browserify:
What is the problems for use riot in svg
Original HTML <use>
element usage:
In riot.js may you try:
!!! DOESN'T WORK WHY? Because <use>
element can't dynamic change xlink:href
attriabute for link symbol #id
Use svg srpite component
thissymbol_id = 'edit'
yield:
Congratulation !!! Shorten and work fine now.
Note: Please without
#
syntax, component will add this automated.
Options
-
link
link to symbol #id -
class
set class name