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

What is Framer? Join the Community
Return to index
Thierry Meier
Posted Jun 04 - Read on Facebook

Just a quick beginner question. How can one manipulate a defined HTML layer? Example: A button with a HTML layer on top that says "Click me" and once clicked, the same HTML layer will say "Clicked". Thanks!


Thierry Meier

Also, more importantly, how can one animate the change of text?

Balraj Chana

You can just add: btn.on Events.Click, -> btnText.html = "Clicked". You can toggle the animation using states.

Jordan Robert Dobson

Thierry - what type of text animation are you thinking?

Thierry Meier

Jordan Robert Dobson – ideally slight fades that make the whole transition smoother, as without it it feels very rustic.

Balraj Chana – figured that out, easier than I thought it would be! :)

Jordan Robert Dobson

If you do a fade you need two text layers on your button.

Jordan Robert Dobson

Otherwise you would have to do it with CSS. Fade text color out. Then switch HTML to new text then... Fade back in.

Read the entire post on Facebook