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

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

I have different artboards in a .sketch file and each artboard has a bottom navbar. In order to have unique names for each layer, I named each icon in the bottom navbar like 'inbox1' in the first artboard, then 'inbox2' in the second artboard, etc. What would be the best (and quickest way to enable tap on all nav elements? I think I need to write the action for each icon in each artboard and that is very time consuming. Any suggestions will be very appreciated. Thank you!

12 Comments

Stephen Crowley

You want to create an array that contains the layers you want to have the same actions and then create a for loop with the event and properties. So, apologize in advanced I'm on a phone but something like:

navButtons = [item1,item2]

for button in navButtons
button.on Event.click, ->

Stephen Crowley

My real question is how come you need multiple nav bars if its going to be persistent navigation?

Matt Bogado

that's a great question, Stephen Crowley. I tried using the same navbar across different artboards, but I cannot figure out the x position... any ideas on how to make the x = 0 for one navbar applied to multiple artboards? every time I display a different artboard I need to set the x = 0 for that artboard...

Matt Bogado

perhaps what you are hinting is to put all the sections in one artboard and turn the opacity to 1 on selection of the navbar element

Bäd Rick

You could a make an art board with just the navbar with all icons in both states (normal and pressed/active) on it. Then hide them ( active states) in framer and place the navbar globally over all other screens. On a event you can trigger the active state and the action you want to achieve eg. slide to another view …

Bäd Rick

Ps make an art board at the screen size of all your other views and place it where it should appear globally. In this way you don't have to set its x and y manually. Sorry Ian on my phone as well ;)

Matt Bogado

So the navbar would be by default x:0 and y:0. Then for all art boards I would change the x + y values manually to make them show up. Is that what you are saying?

Matt Bogado

Bäd Rick I reorganized my .sketch file to have the navbar in one artboard. I will really appreciate if you can guide me on how to place the navbar globally over all other screens. I cannot seem to understand how to do that. Thank you in advanced!

Bäd Rick

I will post an example later today

Bäd Rick

i just made a quick example.@Matt Bogado I hope I could help you. http://share.framerjs.com/qx5q0rqgc9nv/

Matt Bogado

Awesome, Bäd Rick! Thank you so much!

Read the entire post on Facebook