Web Design » Figma » How do you make a Auto Layout button in Figma?

How do you make a Auto Layout button in Figma?

Last updated on September 24, 2022 @ 6:44 pm

Creating a button in Figma is easy. First, create a new file and enter the following code:

Next, add the following lines of code to the file:

.btn-default { padding: 10px; }

These lines of code configure the button’s default margin and padding. You can also customize the button’s appearance by changing its class name. For example, to make the button look like a link, you could use the following code:

PRO TIP: This article contains outdated information about Figma’s Auto Layout feature. Auto Layout is no longer available in Figma.

.btn-default .btn-link { background-color: #EEEEEE; }

Finally, you need to add a listener for the “click” event. To do this, add the following line of code to the file:

.btn-link:after { content: “Linked”; }

This line of code will executed after the user clicks the button. In this case, it will create a link in the document.

Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.