Glass & Morphism
Glassmorphism, neumorphism, liquid glass and superellipse.
Updated
What is glassmorphism, and how is it made in CSS?
Glassmorphism is a style of translucent, frosted-glass surfaces layered over a colourful background. In CSS it combines a semi-transparent background, backdrop-filter: blur() to soften what lies behind, a thin light border and a soft shadow. Neumorphism and superellipse (squircle) shapes, also on this page, are close relatives.
How to choose, performance and accessibility
- It works best for cards, navigation bars, modals and pricing tables placed over images or gradients, as in Glass Card, Frosted Panel or Glass Navigation, and poorly over plain white.
- Check text contrast against the brightest area behind the glass, limit the number of blurred layers on mobile, and provide a solid fallback where
backdrop-filteris unavailable. - Glass Card, Frosted Panel, Neu Button, Squircle Cards, Beveled Control Panel and Liquid Glass are free with their code; the rest come with Premium.
Glass Card
Hover for the effect
Glass Card
Classic glassmorphism card with backdrop-filter, semi-transparent background and subtle border. Colored orbs float behind.
View source code
<div class="demo-preview">
<div class="glass-card-scene">
<div class="glass-card-orb glass-card-orb--1"></div>
<div class="glass-card-orb glass-card-orb--2"></div>
<div class="glass-card-orb glass-card-orb--3"></div>
<div class="glass-card-element">
<h3>Glass Card</h3>
<p>Hover for the effect</p>
</div>
</div>
</div>.demo-preview,
.demo-preview *,
.demo-preview *::before,
.demo-preview *::after {
box-sizing: border-box
}
.demo-preview {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 250px;
overflow: hidden;
position: relative;
background: rgb(224, 229, 236);
color: rgb(255, 255, 255);
font-family: sans-serif;
}
.glass-card-scene {
width: 320px;
height: 220px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.glass-card-orb {
position: absolute;
border-radius: 50%;
filter: blur(40px);
animation: glassOrbFloat 6s ease-in-out infinite;
}
.glass-card-orb--1 {
width: 120px;
height: 120px;
background: #8b5cf6;
top: 10px;
left: 20px;
animation-delay: 0s;
}
.glass-card-orb--2 {
width: 100px;
height: 100px;
background: #06b6d4;
bottom: 10px;
right: 20px;
animation-delay: -2s;
}
.glass-card-orb--3 {
width: 80px;
height: 80px;
background: #ec4899;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
animation-delay: -4s;
}
.glass-card-element {
position: relative;
z-index: 1;
width: 260px;
height: 160px;
background: rgba(255, 255, 255, 0.07);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.12);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
cursor: pointer;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card-element:hover {
transform: translateY(-4px);
box-shadow: 0 12px 40px rgba(139, 92, 246, 0.3);
}
.glass-card-element::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
border-radius: inherit;
pointer-events: none;
}
.glass-card-element h3 {
font-size: 1.1rem;
font-weight: 700;
color: #fff;
margin: 0;
}
.glass-card-element p {
font-size: 0.8rem;
color: rgba(255, 255, 255, 0.6);
margin: 0;
}
@keyframes glassOrbFloat {
0%,
100% {
transform: translate(0, 0) scale(1);
}
33% {
transform: translate(15px, -10px) scale(1.1);
}
66% {
transform: translate(-10px, 15px) scale(0.9);
}
}/* Pure CSS — no JavaScript required */Frosted Panel
Blobs move behind the frosted glass
Frosted Panel
Frosted panel with animated gradient blobs in the background, showing the blur effect in real time.
View source code
<div class="demo-preview">
<div class="frosted-panel-scene">
<div class="frosted-blob frosted-blob--1"></div>
<div class="frosted-blob frosted-blob--2"></div>
<div class="frosted-blob frosted-blob--3"></div>
<div class="frosted-panel-element">
<h3>Frosted Panel</h3>
<p>Blobs move behind the frosted glass</p>
<div class="frosted-dots">
<span class="frosted-dot"></span>
<span class="frosted-dot"></span>
<span class="frosted-dot"></span>
</div>
</div>
</div>
</div>.demo-preview,
.demo-preview *,
.demo-preview *::before,
.demo-preview *::after {
box-sizing: border-box
}
.demo-preview {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 250px;
overflow: hidden;
position: relative;
background: rgb(224, 229, 236);
color: rgb(255, 255, 255);
font-family: sans-serif;
}
.frosted-panel-scene {
width: 340px;
height: 230px;
position: relative;
overflow: hidden;
border-radius: 16px;
background: #080812;
}
.frosted-blob {
position: absolute;
border-radius: 50%;
filter: blur(30px);
}
.frosted-blob--1 {
width: 160px;
height: 160px;
background: linear-gradient(135deg, #a855f7, #6366f1);
top: -30px;
left: -20px;
animation: blobDrift1 8s ease-in-out infinite;
}
.frosted-blob--2 {
width: 140px;
height: 140px;
background: linear-gradient(135deg, #06b6d4, #3b82f6);
bottom: -40px;
right: -20px;
animation: blobDrift2 10s ease-in-out infinite;
}
.frosted-blob--3 {
width: 100px;
height: 100px;
background: linear-gradient(135deg, #ec4899, #f43f5e);
top: 50%;
left: 60%;
animation: blobDrift3 7s ease-in-out infinite;
}
.frosted-panel-element {
position: absolute;
inset: 30px;
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
z-index: 1;
}
.frosted-panel-element h3 {
font-size: 1.2rem;
font-weight: 700;
color: #fff;
margin: 0;
}
.frosted-panel-element p {
font-size: 0.75rem;
color: rgba(255, 255, 255, 0.5);
margin: 0;
text-align: center;
padding: 0 20px;
}
.frosted-panel-element .frosted-dots {
display: flex;
gap: 6px;
margin-top: 4px;
}
.frosted-panel-element .frosted-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.3);
}
.frosted-panel-element .frosted-dot:nth-child(1) {
background: #a855f7;
}
.frosted-panel-element .frosted-dot:nth-child(2) {
background: #06b6d4;
}
.frosted-panel-element .frosted-dot:nth-child(3) {
background: #ec4899;
}
@keyframes blobDrift1 {
0%,
100% {
transform: translate(0, 0) rotate(0deg);
}
25% {
transform: translate(40px, 20px) rotate(90deg);
}
50% {
transform: translate(20px, 60px) rotate(180deg);
}
75% {
transform: translate(-10px, 30px) rotate(270deg);
}
}
@keyframes blobDrift2 {
0%,
100% {
transform: translate(0, 0) rotate(0deg);
}
25% {
transform: translate(-30px, -20px) rotate(-90deg);
}
50% {
transform: translate(-50px, -40px) rotate(-180deg);
}
75% {
transform: translate(-20px, -10px) rotate(-270deg);
}
}
@keyframes blobDrift3 {
0%,
100% {
transform: translate(0, 0) scale(1);
}
50% {
transform: translate(-40px, -30px) scale(1.3);
}
}/* Pure CSS — no JavaScript required */Glass Morphing Button
Glass button that transforms and expands on hover with a backdrop blur effect.
Glass Pricing Card
Glass pricing card with gradient border, price, feature list and call-to-action button.
Frosted Modal
Modal window with frosted glass effect. The background contains colored elements visible through the blur.
Glass Notification
Glass toast notifications with icon, text and close button. Three variants: success, info and warning.
Layered Glass
Multiple glass panels stacked at different blur levels, creating a depth effect.
Glass Input
Form fields with glass effect, backdrop blur and purple glow on focus.
Aurora Glass
Glass card with animated aurora borealis colors behind the frosted surface.
Neu Button
Neumorphic buttons with dual shadow (light and dark). The pressed state uses inset shadows to simulate depth.
View source code
<div class="demo-preview">
<div class="neu-btn-scene">
<button class="neu-btn">
<svg viewBox="0 0 24 24"><path d="M5 12h14M12 5l7 7-7 7"/></svg>
Continue
</button>
<button class="neu-btn neu-btn--pressed">
<svg viewBox="0 0 24 24"><path d="M20 6L9 17l-5-5"/></svg>
Done
</button>
</div>
</div>.demo-preview,
.demo-preview *,
.demo-preview *::before,
.demo-preview *::after {
box-sizing: border-box
}
.demo-preview {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 250px;
overflow: hidden;
position: relative;
background: rgb(224, 229, 236);
color: rgb(255, 255, 255);
font-family: sans-serif;
}
.neu-btn-scene {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.neu-btn {
width: 180px;
height: 54px;
border-radius: 16px;
background: #e0e5ec;
box-shadow: 8px 8px 16px #b8bec7, -8px -8px 16px #ffffff;
border: none;
font-family: 'Inter', sans-serif;
font-size: 0.95rem;
font-weight: 600;
color: #6b7280;
cursor: pointer;
transition: all 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.neu-btn:hover {
box-shadow: 6px 6px 12px #b8bec7, -6px -6px 12px #ffffff;
color: #8b5cf6;
}
.neu-btn:active,
.neu-btn--pressed {
box-shadow: inset 4px 4px 8px #b8bec7, inset -4px -4px 8px #ffffff;
color: #8b5cf6;
}
.neu-btn svg {
width: 18px;
height: 18px;
stroke: currentColor;
fill: none;
stroke-width: 2;
}/* Pure CSS — no JavaScript required */Neu Card
Raised card with inset avatar (inset shadow), colored progress bar and soft shadows on hover.
Neu Toggle
Neumorphic toggle switches with inset track and raised knob. Bounce animation on state change.
Neu Input
Inset input fields with inner shadow. Subtle purple glow on focus and integrated search icon.
Neu Slider
Sliders with inset track and raised thumb. The fill bar uses a purple gradient.
Neu Clock
Neumorphic analog clock with inset dial, real-time animated hands and hour markers.
Neu Music Player
Complete music player with rotating artwork, progress bar and raised control buttons.
Neu Calculator
Complete calculator with inset display, raised keys and equal key with purple gradient.
Claymorphism Card
Colorful neumorphism variant with clay effect: rounded edges, inner shadows and pastel background.
Neu Dashboard
Mini dashboard with raised statistics, inset badge and bar chart in a neumorphic frame.
Liquid Glass Card
Translucent card with refraction and specular highlights via SVG feTurbulence and feSpecularLighting.
Glass Morphing Button
Button that transitions between a solid state and a liquid glass state on hover with SVG displacement.
Liquid Lens Magnifier
Hoverable glass lens that refracts and magnifies underlying content with edge distortion.
Glass Ripple Touch
Click on the glass surface to create concentric ripples that propagate outward.
Iridescent Glass Panel
Glass panel with rainbow chromatic reflections that react to the mouse angle.
Glass Depth Stack
Glass panels stacked at different depths with parallax blur between layers.
Liquid Glass Toggle
Toggle switch with a liquid glass bubble knob that squishes and refracts light.
Rain on Glass
Animated water drops sliding on a frosted glass surface with refraction trails.
Glass Shatter & Reform
Click to shatter the glass panel into fragments, then magnetically reassemble it.
Bubble Glass Grid
Grid of glass bubbles that merge and separate on hover with smooth transitions.
Glass Caustics
Luminous caustic patterns projected under a glass layer, simulating light refraction.