Apply CSS to custom icons #5784
-
I just started using Clarity icons fairly recently, and I really like it. However, I am having difficulties in applying css to custom icons. I use
And now I would like to use CSS to change the fill color of this icon on hover, and I am unable to do so no matter what I try. Do you have any ideas how to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @arnifreyrs https://stackblitz.com/edit/react-ts-qimvzz?file=style.css a quick example to accomplish the color change on hover. You have to use the https://clarity.design/foundation/icons/api/#icon-css-properties because this is used on a host level to set the icon color. P.S. The stackblitz playground may not run at the first time and you can resolve that with couple of reloads with DevTools opened |
Beta Was this translation helpful? Give feedback.
Hi @arnifreyrs
https://stackblitz.com/edit/react-ts-qimvzz?file=style.css a quick example to accomplish the color change on hover.
You have to use the https://clarity.design/foundation/icons/api/#icon-css-properties because this is used on a host level to set the icon color.
P.S. The stackblitz playground may not run at the first time and you can resolve that with couple of reloads with DevTools opened