🟣 Neumorphism = Soft UI Design
Neumorphism blends skeuomorphism and flat design. Box shadows create the soft, extruded look that makes UIs feel tactile and modern.
📝 Neumorphism Components
// Neumorphism Base
.neumorph {
background: #e0e5ec;
border-radius: 16px;
box-shadow:
8px 8px 16px rgba(163,177,198,0.6),
-8px -8px 16px rgba(255,255,255,0.5);
}
// Neumorphism Inset (Pressed)
.neumorph-inset {
background: #e0e5ec;
border-radius: 16px;
box-shadow:
inset 8px 8px 16px rgba(163,177,198,0.6),
inset -8px -8px 16px rgba(255,255,255,0.5);
}
// Neumorphism Card
.neumorph-card {
background: #e0e5ec;
border-radius: 20px;
padding: 32px;
box-shadow:
12px 12px 24px rgba(163,177,198,0.6),
-12px -12px 24px rgba(255,255,255,0.5);
transition: all 0.3s ease;
}
.neumorph-card:hover {
box-shadow:
6px 6px 12px rgba(163,177,198,0.6),
-6px -6px 12px rgba(255,255,255,0.5);
transform: translateY(-2px);
}
// Neumorphism Button
.neumorph-button {
background: #e0e5ec;
border: none;
border-radius: 50px;
padding: 12px 32px;
font-weight: 600;
color: #2c3e50;
box-shadow:
6px 6px 12px rgba(163,177,198,0.6),
-6px -6px 12px rgba(255,255,255,0.5);
cursor: pointer;
transition: all 0.15s ease;
}
.neumorph-button:active {
box-shadow:
inset 6px 6px 12px rgba(163,177,198,0.6),
inset -6px -6px 12px rgba(255,255,255,0.5);
transform: scale(0.98);
}
// Colored Neumorphism
.blue-neumorph {
background: #d4e4f7;
box-shadow:
8px 8px 16px rgba(139, 178, 227, 0.6),
-8px -8px 16px rgba(255, 255, 255, 0.5);
}
// Dark Mode Neumorphism
.dark-neumorph {
background: #2d3748;
box-shadow:
8px 8px 16px rgba(0,0,0,0.4),
-8px -8px 16px rgba(255,255,255,0.05);
}
🎯 Interactive Neumorphism
// Toggle Switch Neumorphism
.neumorph-toggle {
display: inline-block;
width: 60px;
height: 30px;
background: #e0e5ec;
border-radius: 30px;
box-shadow:
inset 3px 3px 6px rgba(163,177,198,0.6),
inset -3px -3px 6px rgba(255,255,255,0.5);
position: relative;
cursor: pointer;
}
.neumorph-toggle .slider {
position: absolute;
top: 3px;
left: 3px;
width: 24px;
height: 24px;
background: #e0e5ec;
border-radius: 50%;
box-shadow:
3px 3px 6px rgba(163,177,198,0.6),
-3px -3px 6px rgba(255,255,255,0.5);
transition: all 0.3s ease;
}
.neumorph-toggle.active .slider {
left: 33px;
background: #4CAF50;
}
// Neumorphism Gallery
.neumorph-gallery {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 30px;
padding: 30px;
}
.neumorph-item {
background: #e0e5ec;
border-radius: 16px;
padding: 20px;
text-align: center;
box-shadow:
6px 6px 12px rgba(163,177,198,0.6),
-6px -6px 12px rgba(255,255,255,0.5);
}
// Loading Spinner Neumorphism
.neumorph-spinner {
width: 50px;
height: 50px;
background: #e0e5ec;
border-radius: 50%;
box-shadow:
inset 4px 4px 8px rgba(163,177,198,0.6),
inset -4px -4px 8px rgba(255,255,255,0.5);
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
// Neumorphism Form
.neumorph-input {
background: #e0e5ec;
border: none;
padding: 12px 20px;
border-radius: 50px;
box-shadow:
inset 4px 4px 8px rgba(163,177,198,0.6),
inset -4px -4px 8px rgba(255,255,255,0.5);
font-size: 16px;
outline: none;
width: 100%;
}
.neumorph-input:focus {
box-shadow:
inset 4px 4px 12px rgba(163,177,198,0.8),
inset -4px -4px 12px rgba(255,255,255,0.3);
}
💡 Neumorphism Best Practices
- Use subtle shadows for a soft look
- Choose appropriate background colors
- Maintain accessibility with contrast
- Use insets for pressed/active states
- Keep consistency across the UI
Neumorphism creates a unique tactile experience. The soft shadows make interfaces feel physical and approachable.
