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

What is Framer? Join the Community
Return to index
Alexander Artsvuni
Posted Feb 16 - Read on Facebook

Dear Framer pros,

Is it possible to create a layer that looks like this in framer?
(without importing this shape/layer from sketch)

Is there anything like:
layer.TopRadius = 80

Thanks!

9 Comments

Andreas Wahlström

sure! try:
layer.style.borderTopLeftRadius = "80px"
layer.style.borderTopRightRadius = "80px"

or:
layer.style.borderRadius = "80px 80px 0 0"
spec: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Properties_Reference

Alexander Artsvuni

Thanks!

Alexander Artsvuni

Andreas Wahlström by the way is there a way to 'apply' border colour as a 'state' for layer?

layer.states.add
statename:
border: "20px solid #ccc";

I've tried this but it does not work...

Matt Wujek

Do you want a transition?

Alexander Artsvuni

yep, i'm trying to change border color, size during transition from one state to another.

Matt Wujek

Cool, give me a minute

Matt Wujek

So, if you're using CSS to style a layer, you can't animate with states. Instead, you can add a CSS transition and toggle it with an event.

http://share.framerjs.com/q11x0gehz5dy/
OR
http://share.framerjs.com/3j0kh8age9e0/

Alexander Artsvuni

Thanks a lot dude!

Matt Wujek

You bet!

Read the entire post on Facebook