Toggle button that changes color depending on toggle state

good day, I created this playground:

  • it was an svg icon button, actually the icon doesn’t appear, that’s my first question, it’s the first time I try to add a url to an icon in playground, maybe I’m doing something wrong

  • and then I would like that depending on the toggle state the color of the svg button, not the background, but the contours of the icon change, I’m not sure if the way I’m doing it is correct

thank you for your help :slight_smile:

You could see here how to use an svg spritesheet: Babylon.js Playground

Which I found with the forum search: Search results for 'gui svg' - Babylon.js

1 Like

Hi. https://playground.babylonjs.com/#9X039W#14
https://www.babylonjs-playground.com/#5MJ1X9#13

2 Likes