Skip to content

Creating a button component

Creating a button component in Figma is a fundamental skill for any designer. In this lecture, you’ll build a reusable button that resizes itself around its label, carries its own styling, and can be dropped anywhere in a file — then updated everywhere from one place.

  1. Enable the Text tool Clicking TT, tool and click on the canvas and type Button.

    Typing the label Get started with the Figma text tool
  2. Wrap it in Auto Layout. With the text layer selected, right-click and select Auto Layout.

    Applying Auto Layout to the text layer and setting padding to 20 by 12
  3. Style the button. Select the Auto Layout frame (not the text inside it) and give it a solid fill, a corner radius of 4, and set the text layer and change the fill colour to white.

    and rename the frame to Primary Button.

    Adding a fill and corner radius to the button frame
  4. Turn it into a component. With the frame selected, right click and select Create component.

    The frame now has a purple diamond icon, which means it is the main component. Any changes you make to this frame will push out to every instance of it.

    Creating a component from the button frame, showing the purple diamond icon
  5. Make button text as property. Select the button text layer and click Apply varilable/property icon in the right panel. Click + to add a new property, name it Label, and click Create. Now the button text is a property of the component, and you can change it on any instance.

    Editing a button instance's label from Get started to Create an account while the button resizes to fit