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

What is Framer? Join the Community
Return to index
Josh Puckett
Posted Jul 12 - Read on Facebook

One of my favorite and most useful patterns is to create classes for commonly used elements in and across prototypes, such as for buttons. You can add behaviors in classes as well, meaning anytime I need an interactive button I just need one line instead of fully creating a new layer + behaviors each time:

3 Comments

Christian Hagel

Thanks for this pattern. Is there a way to add layers within the button class? If for instance I wanted an icon next to the text. I've tried all the combinations of @L = new layer(), L = new layer(parent:@) and so on I can come up with and none of them seem to quite work.

Josh Ackerman

Christian Hagel,
L = new Layer
parent: @
works for me.

Christian Hagel

Thank you. that works. Not entirely sure what I did wrong. Might just have been indention.

Read the entire post on Facebook