This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Nikhil Venkatesh
Posted Jun 23 - Read on Facebook

Hey all! I've changed the cursor on my prototype to a pointer using document.body.style.cursor = "auto".

Does anyone know if i can change the pointer to a hand when it comes across clickable parts?

Thanks :D

7 Comments

Kevyn Arnott

Yeah, just add this style to whatever layers you want the pointer cursor to appear – layer.style.cursor = "pointer"

Nikhil Venkatesh

oh awesome, thanks :)

Nikhil Venkatesh

follow up: Is there a way to do this in a loop for all the onClick elements in the project?

Kevyn Arnott

You're going to need to manually propagate the array of layers with events yourself. There's no reasonable way to get all layers with events. Browsers don't pass the list of layers with events out to the page (I think chrome might now). Anyways, you'll need to write some array.push layer lines to your events, and once you have the array of layers, you can definitely add this style to all of them.

Nikhil Venkatesh

Oh well... Guess I'll have to sift through all my. Code again then

Andy Fuchs

Unfortunately that only seems to work for 'cursor:pointer'
Any other value (e.g. 'cursor:hand') doesn't do anything in v65

Andy Fuchs

Sorry - that was bs. :/ - It works fine as long as I set the cursor to 'auto'. But setting the cursor on a certain DOM-element (e.g. cursor: pointer) simply doesn't work for me (at least in FramerJS and Safari)...

Read the entire post on Facebook