No history yet

Figma Basics

From Design to Code

Before writing a single line of code, most web applications start as a design. Designers use tools to create a visual blueprint, showing exactly how the app should look and feel. One of the most popular tools for this is Figma. It’s a web-based design application, which means you can use it right in your browser without installing anything.

For a developer, understanding the basics of Figma is incredibly useful. It's how you'll receive designs, inspect them for details like colors and spacing, and grab assets like icons and images. Learning to navigate Figma bridges the gap between the design vision and the functional React components you'll build.

Lesson image

Navigating the Workspace

When you first open a Figma file, the interface might seem busy, but it's organized into a few key areas. The large central area is your Canvas, which is where all the design work happens.

On the left, you'll find the Layers Panel. This panel lists every single element on your canvas, like text, shapes, and images. They are typically organized into groups and frames, which helps keep complex designs tidy.

The Toolbar at the top contains your primary tools. You'll find the Move tool (V), the Frame tool (F), shape tools (like rectangles and circles), the Text tool (T), and more.

Finally, the Properties Panel on the right is context-sensitive. When you select an element on the canvas, this panel fills with options to change its properties—things like color, font size, alignment, stroke, and effects like drop shadows. As a developer, you'll spend a lot of time in the "Inspect" tab here to get CSS values.

Core Building Blocks

Designs in Figma are built using a few fundamental elements: Frames, components, and basic shapes.

Frames are the containers for your designs. Think of them as artboards or individual screens of an app. You can create a frame by selecting the Frame tool (F) and drawing a rectangle, or you can choose from preset sizes for popular devices like iPhones, Android devices, and desktops in the Properties Panel.

Components are reusable design elements. A designer might create a component for a button, an icon, or a navigation bar. They design it once, and then they can create copies, or instances, of that component throughout the design. If the main component is updated (for example, the button color changes), all its instances update automatically. This concept is very similar to how you'll build reusable components in React.

A change to a main component in Figma affects all its instances. This is just like changing a React component and seeing it update everywhere it's used in your application.

Basic shapes (rectangles, lines, ellipses) and the Text tool are used to create the visual details within your frames. You can select any of these elements and modify them using the Properties Panel on the right. You can change their color, size, font, spacing, and more.

Exporting for Development

Once a design is complete, your job is to translate it into code. Figma makes this handoff process smooth. You won't just be looking at a static image; you can inspect every element to get its exact specifications.

First, select any element or group of elements on the canvas. In the Properties Panel on the right, switch to the Inspect tab. Here, Figma provides CSS, iOS, or Android code snippets that describe the selected element's properties. This is perfect for grabbing colors, font styles, and dimensions.

For assets like icons, logos, or images, you'll need to export them. Select the asset you want, go to the Design tab in the right sidebar, and scroll to the bottom. You'll find an "Export" section. Here, you can choose the format (SVG is best for icons, while PNG or JPG are good for images) and the size. You can then click the "Export" button to download the asset to your computer, ready to be added to your React project.

Lesson image

Now that you know your way around the Figma interface, let's test your knowledge.

Quiz Questions 1/4

For a web developer, what is the primary purpose of using a Figma design file?

Quiz Questions 2/4

When you select an element on the canvas, which panel shows context-sensitive information like its color, font size, and effects, and also contains the 'Inspect' tab for developers?

With these basics, you can confidently navigate design files, understand how they're structured, and extract the information you need to start building.