I want to have an image component which changes the image based on what the mouse focused on, but I want that there is a gradient over it. I can't use the image in a div and use backgrounds because than my function wouldn't work because I can't give the image in the backgrounds an id.
https://css-test-components.wstd.io I built this test for someone else in discord. It has the same attributes you're looking for. Do you know how to use dev tools to figure out how it's built?