Glassmorphism: The UI Design Trend of 2021
Tags: design, tutorial, css, uiweekly
Published: 2020-12-07 03:46:26

In todays post, we're going to briefly go over what glassmorphism is - and learn how to replicate the effect in [Figma]!

# Introduction

Glassmorphism - It's a fresh new design technique which we've seen used recently by many companies, and most notably, Microsoft in their [Windows 11 video](https://youtu.be/Uh9643c2P6k)

![Glassmorphism](https://user-images.githubusercontent.com/69592270/148622494-a881bd5c-ec23-4596-afa1-d4ed2340ad99.gif)

The design trend for 2020 was Neumorphism - which had some rather obvious issues relating to accessibility and contrast.

![image](https://user-images.githubusercontent.com/69592270/148622615-37ca0de5-fbdf-4301-acf5-c306db2e0d8f.png)

Developers started to use this with a lot of things, which was driving people a little bonkers. 

Now, I'm not bashing neumorphism whatsoever. In fact, I myself like the idea of it somewhat. However, there are of course accessibility issues for people who have eyesight issues, causing the shadow-based contrast system to make the interface inaccessible for them to use.

# Glassmorphism & Accessibility 

Now, another important question which arises from these trendy new design styles is how accessible they are for people with disabilities. 

The main appeal of Glassmorphism is how sleek and minimalistic it looks. We've already seen some examples of Glassmorphism in our daily lives, most notably in operating systems like MacOS Big Sur or the new Windows 11.

However, this doesn't make Glassmorphism an accessible style which the US Government should consider using for their unemployment insurance portal. Let's have a look at some of the accessibility problems that come with it:

### Fonts

Oftentimes with Glassmorphism, developers struggle to make their fonts and text accessible from the website's background and the glass. Developers will often use larger fonts to get around this.

### Borders & Contrast

Glassmorphism, in a way, revolves around borders to distinguish glass elements from non-glass ones. Many developers tend to use thin, light & rather transparent borders which take a toll on the accessibility. However, as can be seen in MacOS Big Sur, a sharper colour contrast between the background of the app and the background of the glass element improve on this issue.

# Let's make our first design!

So, let's hop into [Figma] and create a new file. 

Next, I'll search for some [Mesh Gradients] and pick one which I really like. I think I'll settle for this one:

![image](https://user-images.githubusercontent.com/69592270/101304060-72ff5b00-380d-11eb-8c58-a3172d791c9c.png)

Let's just copy and paste this image file into Figma. I'll set the size to 1920x1080px. 

Next, let's just create a simple rectangle. I'll dimensions to 900x500px and set the border radius to 30px.

Now, let's go in the rectangle toggle a few things. 

First, I'll get started by the colour. Go over to the fill, and change it from solid to a linear gradient.

![image](https://user-images.githubusercontent.com/69592270/101304659-c7570a80-380e-11eb-9fff-9f7045dd3fd7.png)

I'll move the two points diagonally across the small box we just made. 

![image](https://user-images.githubusercontent.com/69592270/101304677-d6d65380-380e-11eb-9ba9-64451b0d3d91.png)

Now, let's toggle the colours for these two. I'll go to the one up top and change the colour white (#FFFFFF) and set opacity to 70%.

Let's toggle the bottom one. I'll set the colour to white (#FFFFFF) and set opacity to 40%.

Here's a code for the linear gradient, for those interested. 

```css
background: linear-gradient(107.18deg, rgba(255, 255, 255, 0.7) 1.84%, rgba(255, 255, 255, 0.4) 100%);
```

Next, let's give it a small outline. I'll go to outline, hit the "+" and create a new outline. I'll give this a thickness of 5px.

Let's go into colours again, and also make the colour on this a gradient.

![image](https://user-images.githubusercontent.com/69592270/101304659-c7570a80-380e-11eb-9fff-9f7045dd3fd7.png)

I'll follow the same process as I did last time with the background colour. I'll move the two points diagonally from the top left corner to the bottom right one. 

I'll give the top one a colour of white (#FFFFFF) with a opacity of 30%.

I'll give the top one a colour of white (#FFFFFF) with an opacity of 20%.

Great! Now we have a cool looking outline. 

Next, let's add some blur. Go into "effects", hit "+" and toggle the setting to layer blur.

![image](https://user-images.githubusercontent.com/69592270/101305354-7f38e780-3810-11eb-99ec-5f25b07a6594.png)

Let's not go anywhere too crazy on this. I'll just set it 5.

Now, let's add some background blur. Do the same as said before. I'll set it to... maybe 15 for now. 

Then, to show this effect I'll just add some text. Let's choose a colour of white (#FFFFFF), size of 144px a font of Poppins Bold.

Let's move it below the glass rectangle we created, and tada :tada: you can now see the effect. 

Spoiler: 

![image](https://user-images.githubusercontent.com/69592270/101305713-451c1580-3811-11eb-822b-973faa5c740e.png)

# Foreword

I have a Linux system (and no money) so I can't use Adobe Xd, therefore I'm only able to show this effect to you in Figma. 

Here is a [tutorial] I will recommend to you, if you're interested in learning how to achieve this in Adobe Xd.

I personally have been learning about an experimenting with glassmorphism myself too. Check out this [dribbble design post] for my latest creation with it!

You can view the [Figma Board] for this project, along with the board for my [First one].

To sum everything up, Glassmorphism is in my opinion a great new design trend which I seem emerging and taking the place of Neumorphism in 2020. It has a lot of potential, as there are not nearly as many accessibility issues with it as when compared to Neumorphism.

# Opinion

After some discussion with people in the comments, I'll have to say that Glassmorphism isn't something you'll really be seeing too much on websites. Think of the basis of the design to begin with. For it to look good, you'll probably need some extra space in the background which isn't really practical for websites, in all honesty. Me and others believe that it will be a more popular trend in perhaps advertisements, due to it's clean and attrative look while still being accesible. 


[Figma]: https://figma.com
[Mesh Gradients]: https://duckduckgo.com/?q=mesh+gradients&t=brave&atb=v248-7&iax=images&ia=images
[tutorial]: https://www.youtube.com/watch?v=0cmVsdOFyiI
[dribbble design post]: https://dribbble.com/shots/14714519-Glassmorphism-Resturaunt-Landing-Page
[Figma Board]: https://www.figma.com/file/ivRYzAHY3CXDWB3MzHXUJo/Glassmorphism?node-id=4%3A0
[First one]: https://www.figma.com/file/uBv1BSHYEOmJSndLVIESZc/Maharaja?node-id=0%3A1