Ben Adamson
Ben Adamson

Reputation: 1

Framer.js Shadows

I'm adding a shadow to an oval that I imported from sketch.

If I add a shadow to the oval, there appears a shadow in a box shape around the oval. Very confusing, when I know the layer is an oval.

If I remove layer, but make the layer draggable the oval acts fine and doesn't have square edges.

Here's the shadow code I'm using: mm.Courage.shadowColor = "rgba(0,0,0,0.2)"

Upvotes: 0

Views: 562

Answers (1)

fliptheweb
fliptheweb

Reputation: 1166

You can try to clip your layer to visible oval by using borderRadius property. For example:

mm.Courage.borderRadius = '20px'       # value in pixels or
mm.Courage.borderRadius = '50%'        # in percent or
mm.Courage.borderRadius = '100px/20px' # asymmetric value

Upvotes: 1

Related Questions