Sitemap
Kevin Sage

Kevin Sage

Software Engineer/Musician/Traveller

Neumorphism

3 min readJan 21, 2020

--

In the ever changing landscape of software development, there’s always something new to learn that will add to your ever growing skillset as a developer. Paying attention to trending design patterns within the industry can assure that you will stay a cut above the rest, while maintaining a modern approach to your layouts.

One such trend is a design pattern known as “Neumorphism”. Sounds like something from the Matrix, I know.

This method will not give you the ability to dodge bullets or stop them in mid-air. It will, however, give you a slick new tool for creating slick/modern web apps.

Neumorphism utilizes 3 simple concepts that gives your web page a modern/minimalist design with elements that appear to float just above the page or sunken. When you include additional css for clicks and hovers, the interface really comes alive. For example, adding the concepts of neumorphism can make your buttons look like actual physical buttons on your screen!

Press enter or click to view image in full size

Neumorphism is a design pattern that has been around for several years but has recently increased in popularity with developers. It utilizes CSS built in shadowing properties to create a very modern aesthetic for web pages and apps.

There are only 3 things that you need to remember to implement this into your next project.

  1. Matching Background Color/Element Color
  2. Light Shadow
  3. Dark Shadow

To demonstrate this content there I’ve created a simple h1 with some text. The color of our text is dark grey, for now. We need our colors for the background and the element to match, but without the shadowing, we of course wouldn’t be able to see the text.

Press enter or click to view image in full size
  1. The first thing that you need to do is to make certain that your background color and the color of your element matches. The “Flatiron School” text in the example is an h1.
h1 {  color: #eaeaea;  text-shadow: 6px 6px 12px rgba(0,0,0,.08),               -6px -6px 12px rgba(255,255,255,1);
}

Note that the color of our element is color: #eaeaea; which is a very light grey color. This color will also be the background of our page.

Get Kevin Sage’s stories in your inbox

Join Medium for free to get updates from this writer.

2. The next, and most important step, is to create two opposing shadows on our element. We will be utilizing a dark shadow, and a light shadow which is meant to emulates a light source.

h1 {
color: #eaeaea;
text-shadow: 6px 6px 12px rgba(0,0,0,.08), -6px -6px 12px rgba(255,255,255,1);
}

In the example above, the text-shadow property allows us to add shadows to multiple sides of our elements by separating our shadows with a comma.

There are 4 simple parameters that text shadow accepts.

  1. The first is the h-shadow, which sets the position of the horizontal shadow.

2. Next is the v-shadow, which sets the position of the vertical shadow.

3. The blur radius is next, which simply enhances the shadowing effect, giving you more control.

4. Finally, as you can see, we select a color as our final parameter of our text shadow. The color should be a similar hue, but darker than the element and background color.

The first shadow effect creates the traditional dark shadow on the bottom and right sides of the element.

After creating our dark shadow, we create the inverse of our first shadow effect by adding a white shadow to our left and top sides of our element by simply reversing the horizontal and vertical shadows. We do do this by easily changing them to a negative value.

This design pattern is not only applicable to text but can be applied to shapes as well. The result is our original text with a few shapes thrown in for good measure.

Press enter or click to view image in full size

--

--

Kevin Sage
Kevin Sage

Written by Kevin Sage

Software Engineer/Musician/Traveller