Chainstack Self-Hosted is now available! Launch production-grade blockchain nodes on infrastructure you control.    Get started
  • Pricing
  • Docs

Auto Layout components in Figma

Created Mar 9, 2020 Updated Nov 3, 2022
Cover Blog 1024x542 logo

At Chainstack, we do pay attention to how people interact with our platform. That’s why we need to optimise the design processes that we have to be able to iterate faster and in a more efficient way. Here I will show how Auto Layout components help us to make it happen and how to create a full-page component using Auto Layout in Figma.

I’m a big fan of atomic design because it works well for designers, and it brings us closer to the approach that front-end developers use in their work. While we use the same approach, we can collaborate more effectively. With this in mind, I was trying to find a way to maximize the usage of the atomic design in my components library, and finally with the new Auto Layout it’s possible. Let’s take a look at what I’ve learned.

The approach

If you aren’t familiar with the atomic design concepts, I highly recommend you to read more about atomic design first. 

Instagram Atomic 1024x677 logo
Atomic design applied to the native mobile app Instagram.
Source: https://atomicdesign.bradfrost.com/

The picture above illustrates the logic that I use for my components. With this approach, it’s easy to design components and—what’s very important—to support them after.

Below you can see the page I’ll use as an example. That’s a real page that I’ve designed and use in the project I’m working on at Chainstack. In this post, I’ll focus only on the components that use Auto Layout.

If you don’t want to dive into details, I put a link to the final result in Figma at the end of this post. 

1 Pic Article 1024x534 logo

Atoms 

On the atomic level, everything is quite simple. I highlighted the components that use Auto Layout. 

Atoms logo

Let’s take a look at their anatomy. Text styles and colors are defined in Figma Styles. 

Component 1 1024x260 logo

That’s a typical atomic level component. Auto Layout: Horizontal, Spacing Between Items 8px. 

Molecules

Here the things are getting a bit more challenging. For our molecules, we use only the atoms that we’ve created at the previous step and some of the base elements that I’ve created in my library (font & color styles). 

Molecules 1024x295 logo

The hint bar is the most challenging element here. I use it on a few different pages on the platform, and it behaves differently according to the situation. It should: 

  • Fit to the content size. 
  • Take the full width of the content area. 
  • Support multi-line text for both scenarios above. 

You can’t simply resize an Auto Layout component in Figma, but I don’t want to keep two very similar components in my library. I found a solution. 

Toast 1024x456 logo

How it works: 
I have an Auto Layout component that adjusts its size to the content, but it sits in a component without Auto Layout, so I can resize the parent component manually if I need to adjust it to the page width. 

Component Toast 1024x478 logo

The rest of the components are quite simple. 

The breadcrumbs component, for example, is a stack of atomic components that behave in the same way as its children: atoms adjust their size to the content > the breadcrumbs component adjusts its size to the size of atoms inside. 

Component Bread 1024x364 logo
Bread 1024x368 logo

The buttons block works in the same way. It’s an Auto Layout component with a few atomic buttons components inside. 

Buttons 1024x370 logo

Organisms 

Organisms 1024x999 logo

The most challenging part here was to organize the details section: it should support multi-line parameters. This means that all blocks should behave according to the amount of content the blocks above have. It can have from one to three rows of parameters, so we need to support any configurations within these limits:  

  • From 1 to 3 rows. 
  • Rows can have 4 blocks of information or less. 
Details Explanation 1 1024x241 logo

The first layer helps us create paddings around the content. 

Details Explanation 2 1024x390 logo

This layer split the content section from the section header (“Details”). 

Details Explanation 3 1024x390 logo

Here we create paddings between the rows with a few atomic design components inside. 

Details Explanation 4 1024x390 logo

The final level is a row component with a few atomic design components inside. It behaves in the same way as the breadcrumbs component. 

Another big organism is a table component, but it’s much simpler. 
Here we need the first Auto Layout component to separate the header from the body. 

Table 1 1024x441 logo

Then I use Auto Layout with 0 spacing to make the table. 

Table 2 1024x419 logo

Templates 

The template has a content section where we collect all dynamic elements and a few components that sit in their places (breadcrumbs, section header). 

Template 1024x654 logo

Header 1024x79 logo
The main header

I didn’t add the main header to the final template because components in Figma don’t support fix position when scrolling for its elements. This is the only reason that doesn’t allow us to use this page as a component, but it’s not a problem for short pages that fit 100% of its content to the screen. 

Now we have a very flexible, easy to support page. This is what it looks like in the end. 

Final 1024x614 logo

In the animation above, you can see how our atomic design page works in the prototyping mode in Figma. 

Screenshot 2020 03 09 At 2.20.04 Pm 1024x524 logo

That’s how simple and clean the page looks. On top of that, all components on the page are very flexible and responsive, and I can use them across all my design files. In case of any changes in the design of the page, I can update them in my library, and it will update all my design files automatically.  

Here is a link to the page: https://figma.fun/TxDFA4 

P.S. 

Figma suggests using an automatic Auto Layout creation (press Shift + A) for simple components, and usually it works well, but sometimes it doesn’t work as expected. Instead of removing the background layer and replicating it with Auto Layout parameters, Figma thinks that it’s an object that’s supposed to be a part of the component that we’re trying to create. You can see an example of this behaviour below. In this case, I create the Auto Layout component manually. 

Auto Layout Bug logo

Join our community of innovators

Have you already explored what you can achieve with Chainstack? Get started for free today.

SHARE THIS ARTICLE
Referral Program 530x281 logo

Introducing the Chainstack referral program

You’ve probably already told someone to use Chainstack. A teammate, founder or friend. Starting today, that recommendation earns you 20% of their subscription for a full year.

T9c0d9l8p U0a2lha30nl 07cf70c046c6 512 150x150 logo
Alex Usachev
Apr 21
Customer Stories

BonusTrade.AI

BonusTrade.AI unlocks real-time crypto market insights with low latency and high-performance Chainstack infrastructure.

tendex

Multi-contract stress-testing to ensure smooth trading infrastructure mainnet operations.

Trust

Trust Wallet leverages a custom gateway to handle high-volumes of requests across multiple networks with a 400% ROI on nodes.