SolutionsCase StudiesAI ToolsResourcesAboutContact
Get Your Free AI Automation Audit Book a Free 30-Minute Strategy Call
Playground~/frontend Open editor

~/css/claymorphism

7 CSS Claymorphism

6 Pure CSS1 with JSPublished 2026-10-05Free · no sign-up

Seven playful clay components: a puffy card, a button that squishes when pressed, a set of pastel app icons, a sunken text field, a toggle with a clay knob, statistic tiles and a profile badge with a floating avatar.

01. Clay Card

ClaymorphismCard

A soft, puffy card that looks moulded from clay: big rounded corners, a pastel fill, an outer shadow for lift and two inset shadows, a light one on top and a dark one at the bottom, that give the surface its rounded volume.

View code
<article class="cly1"><span class="ic" aria-hidden="true">🍓</span><h3>Berry smoothie</h3><p>Strawberry, oat milk, honey.</p></article>
.cly1 { width: 220px; max-width: 100%; padding: 22px; box-sizing: border-box; border-radius: 32px; background: #fbcfe8; box-shadow: 14px 16px 28px -10px rgba(190,24,93,.45), inset -6px -8px 14px rgba(190,24,93,.25), inset 6px 8px 14px rgba(255,255,255,.75); font: 14px Inter, system-ui, sans-serif; color: #500724; }
.cly1 .ic { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 10px; border-radius: 20px; background: #fdf2f8; box-shadow: inset -3px -4px 8px rgba(190,24,93,.2), inset 3px 4px 8px #fff; font-size: 28px; }
.cly1 h3 { margin: 0 0 4px; font-size: 19px; } .cly1 p { margin: 0; color: #831843; }

02. Squishy Clay Button

ClaymorphismButton

A chunky pastel button with clay shading that squishes when pressed, flattening slightly with a transform and reversing its inner shadows. The bright fill and dark text keep it readable.

View code
<button class="cly2">Let’s play</button>
.cly2 { padding: 16px 30px; border: 0; border-radius: 26px; background: #a5f3fc; color: #083344; font: 800 17px Inter, system-ui, sans-serif; box-shadow: 8px 10px 18px -8px rgba(8,145,178,.6), inset -4px -6px 10px rgba(8,145,178,.35), inset 4px 6px 10px rgba(255,255,255,.8); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.cly2:active { transform: scale(.96, .9); box-shadow: 3px 4px 10px -6px rgba(8,145,178,.6), inset 4px 6px 10px rgba(8,145,178,.3), inset -4px -6px 10px rgba(255,255,255,.7); }
.cly2:focus-visible { outline: 3px solid #0e7490; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .cly2 { transition: none; } }

03. Clay App Icons

ClaymorphismIcons

A row of rounded square icons in different pastel clays, each with the same shading recipe in its own hue. The shadow colour is a custom property per icon, so one set of shadow rules keeps the whole set consistent.

View code
<ul class="cly3"><li style="--c:#fde68a;--d:180,83,9"><span aria-hidden="true">☀</span><b>Weather</b></li><li style="--c:#bbf7d0;--d:21,128,61"><span aria-hidden="true">✿</span><b>Garden</b></li><li style="--c:#c7d2fe;--d:67,56,202"><span aria-hidden="true">♪</span><b>Music</b></li></ul>
.cly3 { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; font: 600 12px Inter, system-ui, sans-serif; color: #1f2937; }
.cly3 li { display: grid; justify-items: center; gap: 8px; }
.cly3 span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; background: var(--c); font-size: 26px; box-shadow: 8px 10px 16px -8px rgba(var(--d),.5), inset -4px -5px 9px rgba(var(--d),.3), inset 4px 5px 9px rgba(255,255,255,.75); }
.cly3 b { font-weight: 600; }

04. Clay Text Field

ClaymorphismInput

A rounded clay input that looks pressed into the surface with inverted inner shadows, plus a puffy Go button beside it. A strong focus ring keeps it accessible, since soft shading alone does not show focus well.

View code
<form class="cly4"><label for="cly4i">Your name</label><div class="r"><input id="cly4i" placeholder="Type here"><button>Go</button></div></form>
.cly4 { display: grid; gap: 8px; width: 280px; max-width: 100%; padding: 20px; box-sizing: border-box; border-radius: 28px; background: #ddd6fe; font: 14px Inter, system-ui, sans-serif; color: #2e1065; }
.cly4 label { font-weight: 700; }
.cly4 .r { display: flex; gap: 8px; }
.cly4 input { flex: 1; min-width: 0; padding: 12px 16px; border: 0; border-radius: 20px; background: #ede9fe; color: #2e1065; font: inherit; box-shadow: inset 4px 5px 9px rgba(91,33,182,.25), inset -4px -5px 9px rgba(255,255,255,.8); }
.cly4 input::placeholder { color: #6d28d9; } .cly4 input:focus { outline: 3px solid #6d28d9; outline-offset: 2px; }
.cly4 button { padding: 0 18px; border: 0; border-radius: 20px; background: #a78bfa; color: #2e1065; font: 800 14px Inter, system-ui, sans-serif; box-shadow: 4px 6px 12px -6px rgba(91,33,182,.6), inset -3px -4px 8px rgba(91,33,182,.3), inset 3px 4px 8px rgba(255,255,255,.6); cursor: pointer; }
.cly4 button:focus-visible { outline: 3px solid #6d28d9; outline-offset: 2px; }

05. Clay Toggle

ClaymorphismSwitch

A pill switch with a clay knob that slides across a sunken track, turning the track green when on. It is a role="switch" button with aria-checked, and the colour change is backed by the knob's position.

View code
<button class="cly5" role="switch" aria-checked="false" aria-label="Notifications"><span></span></button>
.cly5 { position: relative; width: 84px; height: 44px; padding: 0; border: 0; border-radius: 22px; background: #e5e7eb; box-shadow: inset 4px 5px 9px rgba(0,0,0,.15), inset -4px -5px 9px rgba(255,255,255,.9); cursor: pointer; transition: background .25s; }
.cly5 span { position: absolute; top: 5px; left: 5px; width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 4px 5px 10px -4px rgba(0,0,0,.35), inset -3px -4px 7px rgba(0,0,0,.12), inset 3px 4px 7px #fff; transition: transform .25s cubic-bezier(.3,1.4,.6,1); }
.cly5[aria-checked=true] { background: #86efac; } .cly5[aria-checked=true] span { transform: translateX(40px); }
.cly5:focus-visible { outline: 3px solid #15803d; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .cly5, .cly5 span { transition: none; } }
var b = document.querySelector('.cly5');
b.onclick = function () { b.setAttribute('aria-checked', b.getAttribute('aria-checked') !== 'true'); };

06. Clay Stat Tiles

ClaymorphismData

Three statistics in rounded clay tiles of different colours, a friendly way to show numbers in a kids' or wellness app. Each tile pairs the number with its label in a description list group.

View code
<dl class="cly6"><div style="--c:#fed7aa;--d:194,65,12"><dt>Steps</dt><dd>8,412</dd></div><div style="--c:#bae6fd;--d:3,105,161"><dt>Water</dt><dd>1.6 L</dd></div><div style="--c:#d9f99d;--d:77,124,15"><dt>Sleep</dt><dd>7 h</dd></div></dl>
.cly6 { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 12px; width: 320px; max-width: 100%; margin: 0; font-family: Inter, system-ui, sans-serif; }
.cly6 div { display: flex; flex-direction: column-reverse; align-items: center; padding: 16px 8px; border-radius: 26px; background: var(--c); box-shadow: 8px 10px 16px -8px rgba(var(--d),.5), inset -4px -5px 9px rgba(var(--d),.25), inset 4px 5px 9px rgba(255,255,255,.75); }
.cly6 dt { color: #1f2937; font-size: 12px; font-weight: 600; } .cly6 dd { margin: 0; color: #111827; font-size: 20px; font-weight: 800; }

07. Clay Profile Badge

ClaymorphismProfile

A playful profile badge with a clay avatar circle floating above a clay card, the 3D-illustration look of many modern apps. The avatar is decorative and the person's name is the card's heading.

View code
<article class="cly7"><span class="av" aria-hidden="true">🦊</span><h3>Robin</h3><p>Level 12 explorer</p></article>
.cly7 { position: relative; display: grid; justify-items: center; width: 200px; max-width: 100%; margin-top: 30px; padding: 46px 18px 20px; box-sizing: border-box; border-radius: 30px; background: #fde68a; box-shadow: 12px 14px 24px -10px rgba(180,83,9,.5), inset -6px -8px 14px rgba(180,83,9,.25), inset 6px 8px 14px rgba(255,255,255,.7); font: 14px Inter, system-ui, sans-serif; color: #451a03; }
.cly7 .av { position: absolute; top: -32px; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: #fdba74; font-size: 34px; box-shadow: 6px 8px 14px -6px rgba(180,83,9,.55), inset -4px -5px 9px rgba(180,83,9,.3), inset 4px 5px 9px rgba(255,255,255,.7); }
.cly7 h3 { margin: 0 0 2px; font-size: 20px; } .cly7 p { margin: 0; color: #78350f; }

About these CSS Claymorphism

Three shadows make clay

Claymorphism combines an outer shadow for lift with two inset shadows: a light one at the top left and a darker one at the bottom right, which round the surface like soft clay.

Pastels and big radii

Soft pastel fills and generous border radii, 24 pixels and up, give the friendly, toy-like look. Sharp corners break the effect.

Tint the shadows

Use a darker shade of each element's own colour for its shadows rather than grey, so pink clay casts pink shadow and stays vibrant.

Clear states

Soft shading alone does not show focus or selection well. Add focus rings and colour changes, such as the green track on the toggle.

Frequently asked questions

How is claymorphism different from neumorphism?

Neumorphism blends into the background; clay floats above it with colourful fills and outer shadows.

Who is it for?

Kids' products, wellness apps, games and friendly brands.

Is it accessible?

With dark text on pastel fills and strong focus rings, as in these demos, yes.