Learn Figma Basics, Part 8: Components and Styles
Tags: figma, design, tutorial, beginners
Published: 2020-05-04 19:16:10

Figma makes your design process faster with the help of components.

When designing interfaces, you need to work with the same elements multiple times, like buttons, icons, cards..etc

With the components feature, you can transform any element into a master component and create instances of it, if you add any change to a component, the same changes will be applied to all its instances.

You can create a Component out of any collection of objects or layers. 
This could be something as simple as a button or a field, or a more complex design like a menu.

Select the layers you’d like to be **included** in the **Master Component**
In the **Options menu**, click the **Create Component button**.

![figma components](https://lh3.googleusercontent.com/2sGniJ-O7_7XjKgOW6ZIc9ZX-OqQHBolFbKa49Sm_S62v7q5kAwB-SKrrp2YcA5nT4Z45lvqB4sfYU_l5OrCSo9J5CZooqR2b6P5eSzPJC4f61K1LYA4dhRRZkcMWg2PZXNAjOiz)
* Create Component button*

###**Create a button component:**
Components are often used for buttons. it helps you create one single button and then duplicate it as much as you need to.

**1 - Create a button:**
- Select the **frame tool** and draw a frame  of **400px by 60px** in the canvas
![figma components](https://lh5.googleusercontent.com/0HJdgkzgNaYydnRWeAgWaPSgXScFVYAw50MPNmrekyiG_EQ0CeZsyMvKCLLb1iOeFOJsT-RQb1ClwIXy70kCZmJqLB0L89RFaoipqWBfF9ysRRy0UU7AsEt3JyppxyRzgC9x8asj)

- Rename the frame by selecting the frame layer on the layers panel. 

![figma components](https://lh4.googleusercontent.com/Qrp1QfnwyuTpyh95bwxoZXgONpNp7pPj-eKMQlnolfuxKLF420fjCywG0ESj7sZzeITMFohzCw_qQmFZ4WWTLaOiE0pZVr0rWgJh1CExYBnsLyIgsKkDLksPndbySlkpkWX4IbW7)

- Double click on the frame layer.
- Change the frame name to “button”.

![figma components](https://lh5.googleusercontent.com/8ClbxkQgPl75uEyAdw7iKmpkw1VHm_SA5C5L8b4lpI34vDnZ2U5QQ5TX4nv0RSeOMLlQisYYZ3D9IlBtZx4x7qQArp2OPtzM5sVAYcoWhXtBU_heVDSMkjjHDV4eR04UICmkxPtj)

- In the **fill section**, change the fill color of the frame to **#1183EC**

![figma components](https://lh6.googleusercontent.com/pgsfSjlFkhP4yeX5NpDT3GdqXj-8qhgZ5g2U9liVIMEdXSDLuDNS9kHr1goHt9E4Y1tA-Bj0dAy1SB08M5HD_fAtSpfhHno3xDtBs8fBG8in2p3BJUDtnjcVGpgI9vUAxbK522gY)

![Figma components](https://lh4.googleusercontent.com/aE5cCN5LFMla56sObDUh0MwPjQlMiamxQBNTvMzzRZsr5JbVuW_CbX2PT1t9m0R5zxFqGMtZmLV-5szaLUN-21RD609hz_prXRGGc7M)

###**2 - Button text :**
- Pick the **type tool** and click in the center of the button frame
- Add the text: “Button”.
- Go to the **text** section in the **properties panel** and change the text setting to the following :
    1 - font-face: Roboto;
    2 - font-size : 25px;
    3 - font-weight : bold.

![Figma components](https://lh5.googleusercontent.com/l4ogceS5cuT3Um2bwrqjDT6xwKkiSmp2ZcpWW5mQPtz3irp8N4YKM6jaqqBaOl4C0IXpVN0ez7ykR6e_IOWhSKweZxwZDTQuPGvmUBw)

- In the **fill section**, change the color of the text layer to white. 
- Align the text layer in the center of the frame.

![Figma components](https://lh4.googleusercontent.com/VSODEKhvesETROmXzVonSGRFxljNQ_eTtVnkZYZwqPYMl_THtzvRW3Xmat96l7GTHHc1p2jtT_H4SBVeqnb3uw-UHXvBAPbH_Au2e_4aQq0iV7eCtu7isq-Bt816YP4ZKu6CWdP3)

####**3 - Drop shadow effect :**
To complete our button, we will add a drop shadow effect.
- Select the button frame.
- In the **effects** section, click the **+** icon to create a new effect layer.
![Figma components](https://lh6.googleusercontent.com/tm9JeWJNOhezFs7dGkpWDV-09MXJbGb0lSHdF3BY-Pr37Ajx6X-QsRhaLyzGR60jrNJeggWIl6cbyystrqi074hiuqoTVZkPxHOjps2L2VH2Nl8O-SK5hn8V0FmXxCqeELhJcum8)

- Select the **effects icon** on the left of the drop shadow effect.

![Figma components](https://lh5.googleusercontent.com/FHcyL555hy17hVZX69Uwcjmn3-dgzdDPdgW-aISOyZHMDuZWYfGpIEFFjZhZhOdS2HsdDH4JA4S1aBCqfqBYfl1EnoxMw6A0EKCiKXfFVbuiaDTOrAfBQeb8fWLThdq6ekAKG-zp)

- Change the effects settings to the following :
    - Blur: 16;
    - X: 0;
    - Y: 8;
    - Color : 0080F5;
    - Opacity: 58%.

![Figma components](https://lh6.googleusercontent.com/vNEMTC7MFd2lOKkQ6dgSw0a1dqfVnEuwlXyEQQ71QxSn9SItn9zHQ1pLSsWIhAiDkx7ppK-XaBR5LiF_ufM8A0V8imJt96V__rdLMcLi73FNwSXKjwnweB3b0K5gOq3cdXna9dj-)

![Figma components](https://lh3.googleusercontent.com/2GVcNGNNKdOt2CKuRftcueKEhwKnOI51X903vFoZZELq8joQW_KFXmzaKKeZ3nc0Ker4QL4XmP4kHGGY3JLuJG66FaXJApsqPXY_s55giTyRtCocC53bC4qejt7j5FzmI4fUz77h)

###**4 - Transforme the Button to a component:**
- Select the button.
- Click the **create component** icon on the toolbar.

![Figma components](https://lh3.googleusercontent.com/2sGniJ-O7_7XjKgOW6ZIc9ZX-OqQHBolFbKa49Sm_S62v7q5kAwB-SKrrp2YcA5nT4Z45lvqB4sfYU_l5OrCSo9J5CZooqR2b6P5eSzPJC4f61K1LYA4dhRRZkcMWg2PZXNAjOiz)

Now our component is stored in the **assets** library.

###**Access component :**
- Go to the **Layers panel** in the left sidebar, and select the **Assets** tab to access the component.

![Figma components](https://lh6.googleusercontent.com/yDiMSEv0xDLdZoiSiGrWp6RMppyx8MTlDrdRPyRn6C9uJZV3GqNWv6DaxKDv-IN8jffSRsVnz0ta1Mm_q8ANK-5sr1fhm5FcxrnF5oIsUn_twZ-0BKssoHt8dZ_02RIst6AHfokT)

Our component is saved as a local component

![Figma components](https://lh3.googleusercontent.com/noDShJJ0VGO7OlViOdLU7Zoo_zUZxvhwosVvlY5xzE6XeVXzW2j5hwncg440qULL8xLgoBjbe6PvI6fL2c6UKrRdF5q5HSp_6oHBC0tKKHLmnSrGUnL0dGkTuZjRW3seKW3MZIKC)

###**Create an instance:**
We will duplicate our button component in order to re-use it in our design. Every copy created of the component is called an **instance**.

- Select the Button Component.
- Duplicate it by using the Keyboard Shortcut:
	* MacOS: **Command-D**
	* Windows: **Ctrl + D**
- Select the text layer of the instance button.
- Change its text content to “Button 2”.

![Figma components](https://lh6.googleusercontent.com/pzIbFUdDT962HeROkR2Vbj8Pwt_dJNLW9OVZLEdsxaT_Y_gVhzl4sgZiXF8uXalFVjlVpdB7OYwZ2XftDje0BoTR3dn4Qd5XajGkxBPr7MPEGdwpPMQeBseaQJwlymLA8UVFwwSv)

Any change applied to the component, it will affect the instance.

![Figma components](https://lh4.googleusercontent.com/DdWmig_P48lUfX6Jj5ntgT4G9-8cVgQz6uf6G-WfnMbRDaxW_wIUMYyktLycRRh5ZYK8Ga1K-HGoIwU733JnBGE49OKkdGrhQc0UY-nciW_emFF-_TNrIEJbKhmHBWclMhyF9aN0)
*Color change*

![Figma components] (https://lh6.googleusercontent.com/3TOBOJqqYcsejGCwXTRbiZjSEjY8s-OkULpfYVW7l52eYoqoLhZdkte5AKSQWMgiMuU2aR06hQh0wJSsbb5tS8DisWHamrVB-4J3MhvSXGkvrm4DCD2_Ac1eYnWvYVk5y0TJE7Ce)
*Resize*

You can experiment with the settings of the button component and see how it affects its instance.


#**Styles:**

Styles are the same as components but for colors, typography, and effects.
You can save any color or text style, then apply it to multiple elements by a click of a button. No need to repeat yourself.

**Create Color, Text, and Effect Styles.**
Figma supports Styles for the following features:
**Paints/Colors**: Fill, Stroke, Background Color
**Text**: Font Family, Size, Line Height, Spacing.
**Effects**: Drop Shadow, Inner Shadow, Layer Blur, Background Blur.
**Layout Grids**: Row, Column, Grid.

###**Create styles :**
Let go back to our button example. We will save the **color** of the button, its **drop shadow** effect, and the **text style** of its text layer.

####**1 - Create a color style :**
- Select the **Button** component.
- In **the Properties Panel**, click the **Styles icon** next to the **Fill section**

![figma styles](https://lh5.googleusercontent.com/UrU4KLUbbsy_hjUdOQKiukCrtNDtpuuDkw6F-YwJ0wxnkZK63b9kFHt5V9mVGJ85YTmoCrqtngds3lFSRffpbGOo-ZBj7f-IwqOoSPOnDnGyF4uoEtzMzdcRw2WtE8TY1U6lBSzr)

- Click the **"+" icon** in the **Color Styles menu** to create a new Style.

![figma styles](https://lh4.googleusercontent.com/Cql-4bF0U6PNE7fIKkPvEA-_0Yeytf6ZAwKx9_bj2ZxSCW52iwQi7sI7FUVMVygAExbGa-OzPh3VaGzeXOezqX_AsYRcnBA2AhBeMk6IeeQV9-zKbzpXlS0mvKEzq_8aZc-xsVS3)

- Give the style a name and click **Create Style.**

![figma styles](https://lh6.googleusercontent.com/7zyH-mAaRFuJaQGkQj4U1VzW2EFjZAGuNZyzBSa-kvXa6rjdyKITwRhjA0FkocKFXeuKmyl9zRRtTGVdVOVCRyk82JzPiV-7MIeMgy7GeXT5gWY6rEOJp1MDjSfQfnKttYNW8yvX)

The new style will replace the color of the component. 

![figma styles](https://lh6.googleusercontent.com/9ySYo7HpHlk_vR7TqzkNQOe6OgVcWdvNBkuMepbw3Zx3TW56WHBgXhj7zFZVJ588C7ard9MpT_QxJn4MQm3rLoapmyWsAnySbVN3D_mEftXBU1HobL9sSOoL9hwQfnfW_rgBhQhI)

###**2 - Create an effect style :**
- Again, select the button component
- Click the styles icon next to the **effects section**

![figma styles](https://lh5.googleusercontent.com/1cvMbMyKoqbm4EaJHgdVJ4Q2Q5qXarJmaKgYlvB0W3EfP5g8sC_WcD9fpzoc5ytF5KA1L5kKyzE-6Y1TMUPo8FLGAwpFJlhvI7OK0S0)

- Click the **+** icon in the **effect styles** menu to create a new style.

![figma styles](https://lh6.googleusercontent.com/9piN5VLsm89NAQjV7bb8Cw_Xyp4vftzYKM8PQZmog6xIVYLKv7yAs3d92MF57eZtOY9kPJZj0GWRDgYp1ZjSi-koLDSd5cufx9-U6bpW5G4QWYTr3dpSJeN7dzg7BHWY_3U1zvmt)

- Add a name to the style and click **create style** to save.

![figma styles](https://lh4.googleusercontent.com/pi76AWwVkvtw0l_7tufwkl-0uCJGoCgIHTnk78JTB1OXAHjPkcDCyHKt6gZDzAMfUnfFbYL98boi7REhpQfim4XF8uMUZP7GuSKza8pYhEplop5clN0jXqNQBCy4g-ouapaYK_dw)

###**3 - Create a text style :**
- Select the **text layer** “Button” of the component.
- Click the **style icon** in the Text section

![text style](https://lh4.googleusercontent.com/BkXVuDjGBzBe-_7wj0QuOXBhd6BhlnSwKxL8kcegDRaVMpeJhflaDUMk8t6dFKXTHWW48vIeAfjoiA57lLxtNqek3vB27HbYEgHUvm2RSxajkTEnEiftm4lgD_an-AVI-gnpnrhp)

- Click the + icon in the **Text Styles menu** to create a new style
- Add a name to the style and click **create style** to save.

###**Access the styles:**
Every style will be listed as a **local style** in the properties panel of the canvas.
To access the styles that we’ve just created, click outside the button frame in the grey space to reveal the **properties panel** of the **canvas**.

![styles](https://lh3.googleusercontent.com/gSBb7nv8Dkrj28zs_MclF5c75EjrXV32D87E8eJJnWdEbOGVg_oerkd0VZCcSTFRUuc3-zQBtiJ5GRN7G3hj2dojpKAjmbqmHoDrf093Hqj0a9qFR2MDbfs0QJp_4NLCwbhn_wBz)

###**Apply Styles to layers and objects**
- Create a new frame of 200 by 60px
![Styles](https://lh4.googleusercontent.com/mEaUxs6ztatcb7WFNNJsidI8tvjHtGgloZ8JcTGEbQQu5-KcdNc1hBHZgfeRCXr9dAT0GdI--QU2MIs6Y_yao-oJSMB-dTXfGkw2vBONilCEyvBSPQ6R2EpaNVkOxVsosmLYVuil)

- Select the **Frame Layer**.

- In the **Properties panel**, click the **Style icon (four dots)** next to the **fill** section.

![Frame ](https://lh4.googleusercontent.com/X5ZjUTBSu3FJO-iox5p2vEPgW-XzwtGuPKeUeSTMsjjSX9vrve79Z4WcXpARGAFc_azQGMyoDMtZ1_Li0gNxZPJJea_iHIRlpBYM67Oc959WHKKl_QMMH0hpIJbFUB_ysuIPXtj3)

- In **the Styles menu**, you will see your **Local Styles** and a**ny Styles shared via the Team Library.** Styles will be ordered alphabetically by team name, then file name.
- Select the color style to apply it to the frame.

![Frame](https://lh4.googleusercontent.com/4JGCqTQAagiiWXeL2wXWS12hHsD7Jc6vnp6pHhVORkuJjM9MK2_o1d40nYXLOZDtwAHUFIbG4I4qtj2hDdOyGM5RhoG5QZZYR5sTGlpSXZLxD6jMlHpHinev52sKqWwYGtmblG5c)

Now that we added a color style to our frame, let’s add the effect style.
- Click the **style icon** in the **effects section**

![Figma](https://lh3.googleusercontent.com/OhsTcDMwYoL1beD6fwrF7m8xBmGThHPFGPQ_nWQ09viiAK-6dqJj5rtPBMSeLv1PmTiqUG6ZyheXqJ42cZfub-5FLoj-cOunAb9vjACOUAhrVetUPONUUwXmdNMdMel5QMkyv9_r) 

- Select the effect style.

![Figma](https://lh6.googleusercontent.com/ZSWqz3aJ5r-uswpp7NrJsa7neDnZk5OOgqQJIT9pVrIANrH-tSg_DmnGi9Tp-f8MaqY1Sv0smUwDSCuR_FwPG31_THCluwFv_0X6mFzYSJe3U8iparmi8r5O8ezdYv2VHcqWN7BJ)

You can do the same to apply a text style to any text layer.

###**Edit a style :**
You have the ability to edit or delete a style.
- Click in the canvas area to reveal the canvas properties panel.
- Right-click on the style item you want to edit or delete.

![Edit a style](https://lh6.googleusercontent.com/lhA1XARM6XDNz3DNC_pkkwXgXPGJN5VCPxiMkVVGalTbuU0r3DPVZk0hO9F6l4I59Uf5pRyar5G_-ixvk6GYoYAvGiWKKnjF7vCvExGhkIHy1cd8VJH5FcX42GU11lHNd4fJxSHe)

- In the edit mode, you can **rename** a style, add a **description**, or change its **settings**.

![Edit a style](https://lh5.googleusercontent.com/lmKl__HDIkS1UvJDGLqzvQ0yrrwVXmyxjkAsl57YF4GgT7bNobZcTrqrFw1HYMk_XHVT8u-tyctMesWs7joOt_SkeCai0NYcV2CH2IGrQj6HzP4IfkC0ZcSAD_W91f_YJl8sD8ZG)

That's all about styles. Create more styles, experiment and if you have a suggestion or any question, please leave a comment.

In the next coming posts, we will create more complex UI elements and see more advanced Figma features.

Please don’t forget to follow and share :)