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

What is Framer? Join the Community
Return to index
Vishal Iyer
Posted Jun 01 - Read on Facebook

I struggle to understand when the syntax is capitalized or not. For eg, its Framer.Defaults.Animation, but layer.states.add. I'm sure there is some underlying system, but I don't see it yet. Can someone explain?

1 Comments

Jordan Robert Dobson

Typically a class name is capitalized. Those are singleton classes I believe.

So that means the Framer class has a Defaults class and that class has an Animation class. Which are properties of Framer and Defaults respectively.

But typically an "instance" of a class is lowercase.

So if we were going to create an instance from the Layer class...

myLayer = new Layer

myLayer starts lowercase since it's only a variable holding an instance of the Layer class.

Properties are typically lowercase too. It's rare to see them capitalized.

Read the entire post on Facebook