Neumorphic List Template

A modern list template styled with the Neumorphism ("soft UI") design trend.

This component uses carefully crafted shadows to create the illusion that the list items are being pushed out from the background.

A screenshot of a list where each item appears extruded from the page in a 'soft UI' style.

Get Source Code Preview

About this Template

Neumorphism is a UI style that aims to mimic a soft, extruded plastic look. The core of the effect is achieved by applying multiple, inset box-shadow properties to an element. To work correctly, the element's background color must be the same as the page's background color. This template applies this technique to a semantic list of links, including a "pressed" state for active items.

Features

Code Breakdown

The component is a simple unordered list (ul) where each list item contains an anchor tag (a) with the class .neumorphic-item.

The visual effect is created entirely in the CSS for .neumorphic-item. A single rule, background-color: var(--neu-bg-color);, ensures the item matches the main page background. The box-shadow property is given two comma-separated values. The first value creates a dark shadow on the bottom-right, and the second value creates a light shadow on the top-left, simulating a light source and creating the extruded illusion.

For the "pressed" state, an .active class changes the box-shadows to be inset, making the item appear pushed into the surface.

Code

Here's the full code for the template:

View Output