Published on

––– views

Recreating components based on Material Design specification in Figma

Authors
  • avatar
    Name
    Norman Wong Chiew Look
    Linkedin

Introduction

If you have ever gone through material design guideline before, you might have encountered the "dp" unit whenever you are referencing their documentation.

"dp" or "Density-independent pixels" is a unit measurement for pixel density. Android, IOS and the web all have different calculation for converting "dp" to pixels("px"). More information about "dp" can be found in the Material Design guidelines

In this article, I will only use material design for web design.

"dp" conversion to "px" for the web is very simple: 1 dp = 1 px.

Using material design specification

Card Component Specification

Link to card component specification

For this demo, I will recreate the component from the picture above.

All the numbers specify the width and height of elements in the components using dp units. Using a rectangle shape, we can just change the width and height of the rectangle (measured in px) to act as a ruler.

Measuring dp with rectangle shape in Figma

Example as illustrated below:

Measurement in figma

Link to my Figma file, so you can see the demo