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

What is Framer? Join the Community
Return to index
Hari Abinash
Posted Apr 22 - Read on Facebook

Hi Framers,

I am reusing a Module in 3/4 prototypes with different background colors for different protos. The different BG Color, I have to put manually inside the each module. Is there anyway I can make it a variable. So that after adding the Module, I can call the variable and change the value of it as required.

Thanks very much for the help.


Niels van Hoorn

Hi Hari,

It depends how you use the BG color and if you expose it in the exporting of the module. Could you maybe share one of the prototypes so I can take a look at it?

Benjamin Den Boer

Hey Hari Abinash, you can override values stored in your module, if the color value is defined as a variable:

module = require "myModule"
module.myVariable = "red"

Hari Abinash

Thanks Niels van Hoorn and Benjamin Den Boer. I am actually making my Material design assets in vector (using SVG via layer html) and in Framer components itself. Minimising the inclusion of images as much as possible. The above issue is with Android Status Bar. I do have a requirement of 5/6 themes with different colored status bar. Currently I am using status bar and navigation bar as module. So thought It would be easy to change the background of the status bar from a single line.

Hari Abinash

Benjamin Den Boer, btw not yet done. There are multiple BG Colors under the status bar, so I have to take only parent BG color as variable and change it accordingly. will update and share once it is done.

Jordan Robert Dobson

You can set your SVG to inherit it's color from its parent. If it's inserted in a layer set the = "orange"

Read the entire post on Facebook