After some testing, I found that setting the cursor to cursor: pointer
works perfectly fine. However, my goal is to use a custom image as a cursor. The image is saved in both my src and public folders, but I seem to be struggling with the syntax when using
"url(JavaScript-logo.png)"
import logo from "../assets/logo1.png";
...
<Typography
sx={{
"&:hover": { cursor: `url(${logo}), auto` },
}}
>
["JavaScript",
</Typography>
I have also attempted to implement this without using &:hover
, as well as without including auto