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

What is Framer? Join the Community
Return to index
Sigurd Tapio Mannsåker
Posted Feb 29 - Read on Facebook

Quick question regarding layer names. How come layer name restrictions seem to apply even for layer names that won't appear anywhere in Framer? Specifically, I have a group with a bunch of layers that begin with a number. Since they will all be flattened on import, it would be nice if I didn't have to worry about cleaning up all their names.

I'm sure there's a good reason for it, anyone care to enlighten me? Or even better, offer a workaround? :)


Marc Krenn

You're talking about the "Layer or Artboard names can not start with a number"-error, right? Are you absolutely certain you're not using foldernames starting with numbers?

Anyway, here's the explanation for this particular error message:
On import, Framer creates Layers based on your 'Sketch' folder-hierarchy. It does so by using a folder's name as the variable name and by assigning a new instance of the 'Layer' class to these newly created variables.

Here's the kicker:
Variable names simply MUST NOT start with a number by the very design of how most compilers work:

"[...] The parser can only make so many assumptions, and one of them is that a number (e.g. 3) is a numeric. It's not the declaration that's a problem (e.g. integer 3things) so much, but the use of the numerics (e.g. total = subtotal + 3things;). The compiler doesn't know if you made a mistake with the "3", even though you declared it earlier."


Read the entire post on Facebook