How to create a reusable navigation bar component in Figma
Introduction
A navigation bar is one of the most common global elements. It needs to contain a logo, links, and actions, and stay consistent across every page.
This guide walks you through building a navbar component that keeps spacing uniform and allows for easy updates.
Prerequisites
- •Logo asset
- •Text links
- •Button component (optional)
Guide Steps
Prepare the internal elements
Group your text links together in an Auto Layout frame. Place your logo and action buttons on the canvas. Convert these interactive elements into components first if they aren't already.
Create the navbar container
Select the logo, links frame, and actions. Press Shift + A to create the main navbar frame. Set direction to 'Horizontal'.
Set distribution to Space Between
In the Auto Layout panel, change the alignment mode to 'Space between' (or set Gap to 'Auto' by typing 'auto' in the gap field). This pushes the logo to the left and actions to the right.
Turn into a component
Add background fill and padding. Set width to 'Fixed' or 'Fill container' depending on your grid. Finally, click 'Create component'. Now you can drop this navbar into any page frame.
Common Mistakes to Avoid
- ×Not wrapping links in their own Auto Layout frame, causing them to spread out individually.
- ×Using a fixed width for the navbar instead of 'Fill container' inside page frames.
Pro-Level Design Tips & Workflows
💡 Canvas Shortcut: Select any parent Auto Layout frame and double-click the inner padding lines directly on the canvas to set sizing values visually without clicking the sidebar.
💡 Spacing Variables: Always bind padding and gap spacings to dynamic variables (e.g. space/8 or space/16) to support system theming scaling.
Practical UI Example & Screenshot Checklist
Here is a real-world scenario where you will apply these exact layout rules:
Build a container frame with a logo and menu links. Set Auto Layout horizontal direction, padding margins to 24px, and select 'Space between' alignment to keep elements pinned to the margins.
- ✓ Inspect the right-hand design variables sidebar.
- ✓ Verify child width dropdown is set to
Fill container. - ✓ Drag the parent frame width to verify elements adapt automatically.
Glossary of Core Design Terms
A sizing constraint instructing the container frame boundaries to fit around child layers automatically.
A responsive instruction that stretches child layers to consume the remaining horizontal space of its parent flex frame.
The primary component template source. Updates to the master component propagate across all visual instances.
Figma Templates & Resources
Figma Starter Playground (.fig)
Includes pre-built design grids, responsive card examples, and button variant frames.