We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi, i couldn't find a way to fill the icon with the gradient colors, if there is a method kindly guide me through the steps
The text was updated successfully, but these errors were encountered:
Something like this should work.
<svg style="width:0;height:0;position:absolute;" aria-hidden="true" focusable="false"> <linearGradient :id="uniqueId" x1="0%" y1="0%" x2="100%" y2="0%" v-if="gradient"> <stop v-for="{offset, color} in gradient" :key="offset" :offset="offset+'%'" :stop-color="color"/> </linearGradient> </svg> <unicon :name="name" :width="size" :height="size" :fill="`url(#${this.uniqueId}) ${color}`"/>
Replace uniqueId with a id/key that is both present on the linearGradient and unicon -> fill tags.
uniqueId
linearGradient
unicon
gradient is an array of objects and could look like this:
gradient
[ {offset: 0, color: '#fff'}, {offset: 100, color: '#000'}, ]
gradientRotation is the rotation of the gradient in deg
gradientRotation
Sorry, something went wrong.
No branches or pull requests
hi, i couldn't find a way to fill the icon with the gradient colors,
if there is a method kindly guide me through the steps
The text was updated successfully, but these errors were encountered: