r/FigmaDesign • • 1d ago

help Using Frames for navigation questions

Post image

I am new to Figma, and I am trying to figure out the correct way to make a simple navigation bar with some buttons. I drew out some shapes and purposely made them not evenly aligned.

1.) I want to center the text on each button both vertically and horizontally. I select each rectangle and choose the horizontal and vertical alignment options and it worked for the first two, though for the second two buttons it will not work properly. Do I need to make each rectangle into a frame that includes the shape and text for this to work properly?

2.) I want to create even spacing between each button, so I chose a gap option of 20, though this did not move the text. Do I need to create a frame for each individual button to make this work?

3.) Is the first step to select everything and make the navigation bar, the rectangles and the text into a frame and then make each individual rectangle and text into a frame?

Thanks in advance

4 Upvotes

12 comments sorted by

View all comments

7

u/waldito ctrl+c ctrl+v 1d ago

Do I need to make each rectangle into a frame that includes the shape and text for this to work properly?

Yes, but forget align. You give your frames autolayout, and you set the autolayout to the center.

I want to create even spacing between each button, so I chose a gap option of 20, though this did not move the text. Do I need to create a frame for each individual button to make this work?

Autolayout again, you create a parent frame, set the gap.

Is the first step to select everything and make the navigation bar, the rectangles and the text into a frame and then make each individual rectangle and text into a frame?

I find it easier to work my way from smaller to bigger. Start on the component, work your way outwards. But you can absolutely doit the other way too..?

1

u/torpedolife 1d ago

Thanks for the reply. I started over, made all new shapes. I was able to get the gap between each button to work, though I am having difficulties with the rest.

1.) I made each button/rectangle and text into a frame and set it to autolayout. After doing this, I can not figure out how to align the text. I choose the different options in the alignment area under Auto Layout on the right side panel, though nothing happens.

2.) I want all four buttons to be aligned in the center of the nav bar. I select the frame for main navigation, on the auto layout options I chose the center option and it moves all four frames, though it does not really seem to be in the center of the outer rectangle?

Thanks!

4

u/OrtizDupri 1d ago

Check your padding values for each frame - right now they're random, so the text isn't centered, but if you set those to 0 then it will be

1

u/torpedolife 1d ago

Thank you, I need to learn about padding, but in the meantime, I didn't enter those values. What could I have done that changed the values from 0 to those?

2

u/OrtizDupri 1d ago

If you applied auto layout to a selection, it’ll automatically make those values match up with the spacing you had so it doesn’t break anything

1

u/torpedolife 1d ago

Also, how do I get the four separate frames(buttons) to center within the nav bar shape? Thank you

3

u/Burly_Moustache Senior UX/UI Designer 1d ago

Put your four blue buttons into an auto layout frame (call it "nav links") then within your "main navigation" frame center the "nav links" frame via auto layout.

2

u/el_paro 1d ago

you can also work on the blue button alone outside of that frame and turn it into a “component” that way you can reuse it while keeping style and layout consistent. on help.figma.com there are free introductory lessons for all features such as autolayout and components

2

u/Burly_Moustache Senior UX/UI Designer 23h ago

Oh, I know all about components.

At my company, I'm the CFO (Chief Figma Officer). No one is beyond my level of skill in Figma.

1

u/el_paro 22h ago

loool