Neumorphism Button
Soft UI button with inset and raised shadow effects
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/neumorphism-button.
<iframe src="/embed/neumorphism-button" sandbox="allow-scripts" loading="lazy" title="Neumorphism Button" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Neumorphism Button, or grab a framework-specific implementation. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.
HTML
<button class="neumorphism-button">Neumorphism</button>CSS
.neumorphism-button {
padding: 1rem 2rem;
border-radius: 1rem;
background: #e0e5ec;
color: #2d3436;
font-weight: 600;
border: none;
cursor: pointer;
box-shadow: 6px 6px 12px #b8b9be, -6px -6px 12px #ffffff;
transition: all 0.2s ease;
}
.neumorphism-button:hover {
box-shadow: 8px 8px 16px #b8b9be, -8px -8px 16px #ffffff;
}
.neumorphism-button:active {
box-shadow: inset 4px 4px 8px #b8b9be, inset -4px -4px 8px #ffffff;
}Tailwind CSS
<button class="px-8 py-4 rounded-2xl bg-gray-200 text-gray-800 font-semibold shadow-[6px_6px_12px_#b8b9be,-6px_-6px_12px_#ffffff] hover:shadow-[8px_8px_16px_#b8b9be,-8px_-8px_16px_#ffffff] active:shadow-[inset_4px_4px_8px_#b8b9be,inset_-4px_-4px_8px_#ffffff] transition-all">
Neumorphism
</button>LWC — HTML template
<template>
<button class="neumorphism-button" onclick={handleClick}>
<slot>Neumorphism</slot>
</button>
</template>LWC — JavaScript
import { LightningElement, api } from 'lwc';
export default class NeumorphismButton extends LightningElement {
@api label = 'Neumorphism';
handleClick() {
this.dispatchEvent(new CustomEvent('buttonclick', {
bubbles: true,
composed: true
}));
}
}LWC — CSS
.neumorphism-button {
padding: 1rem 2rem;
border-radius: 1rem;
background: #e0e5ec;
color: #2d3436;
font-weight: 600;
border: none;
cursor: pointer;
box-shadow: 6px 6px 12px #b8b9be, -6px -6px 12px #ffffff;
transition: all 0.2s ease;
}
.neumorphism-button:hover {
box-shadow: 8px 8px 16px #b8b9be, -8px -8px 16px #ffffff;
}
.neumorphism-button:active {
box-shadow: inset 4px 4px 8px #b8b9be, inset -4px -4px 8px #ffffff;
}LWC — Configuration
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>Where Neumorphism Button fits
- Soft UI
- Modern Dashboards
- Minimalist Apps
- Settings
Interaction states & animations
- Hover
- Pressed
- Shadow
Topics
- #neumorphism
- #soft
- #shadow
- #minimal
- #modern
- #ui
Accessibility notes
Ensure sufficient contrast ratio. Focus states must be clearly visible.
Browser support
- All modern browsers