20 CSS Claymorphism

19 Pure CSS1 Light JSPublished

20 hand-coded claymorphism designs — the puffy, pastel, soft-3D look where every surface reads like moulded clay. The trick is one outer drop shadow to make it float and two inset shadows to inflate it, which is what separates clay from neumorphism. These cover the shadow recipe itself, then buttons, toggles, inputs, cards, modals and app tiles built on it. Scoped under .cl-NN, prefers-reduced-motion guarded, framework-agnostic.

Related22 CSS Neumorphism22 CSS Glassmorphism22 CSS Brutalism18 CSS Gradient UI20 Tailwind CSS Claymorphism

Premium design systemPartner: Untitled UI

Affiliate link

Taking this style from one component to a whole product?

You just browsed 20 clay designs. Untitled UI is the Figma UI kit 380,000+ designers use, with 10,000+ components and variants in Pro, plus a matching React library on Tailwind CSS. Figma Pro is a one-time purchase from $129.

Get Untitled UI Pro

Untitled UI. We may earn a commission, at no extra cost to you.

01. Claymorphism Shadow Recipe Reference Build (opens in a new tab)

Published

Pure CSS
The reference build for the whole trend: one clay object, four radio steps, and the shadow assembled one layer at a time — flat fill, outer drop, inset far-side shadow, inset lit-side highlight. The code panel lights up line by line as you step, so the formula is learned rather than copied. All three layers are always present and only their colors change, so every step animates.

02. Inner Highlight and Inner Shadow Layering (opens in a new tab)

Published

Pure CSS
Isolate the two inset layers and the material becomes obvious: highlight alone looks inflated, shade alone looks hollow, together they look like clay you could press a thumb into. Three spheres show each state, and the hero sphere animates its light around the object using @property-registered lengths — a genuinely animatable inset shadow, not a cross-fade.

03. Border Radius Scale for Puffy Shapes (opens in a new tab)

Published

Pure CSS
Radius is what makes clay clay. This is the working scale — 16px to a full pill — shown at one size so you can see exactly where a rectangle stops being a card and starts being a puffed shape, plus the two advanced corners most tutorials skip: the elliptical slash syntax and the new corner-shape: squircle, progressively enhanced with @supports.

04. Claymorphism vs Neumorphism Side by Side (opens in a new tab)

Published

Pure CSS
The comparison people actually search for, built as two identical cards that differ only in shadow strategy — extruded-from-the-page neumorphism on the left, lifted-object claymorphism on the right — with a swap toggle that applies one style to the other card so you can see the same content both ways, and a spec table covering fill, shadow, contrast and accessibility.

05. Claymorphism with Glassmorphism Hybrid (opens in a new tab)

Published

Pure CSS
The hybrid that dominates 2026 product pages: clay geometry and clay shadow layering, but the fill is frosted glass. A blurred photographic backdrop shows through the card while the inset highlight keeps the puffy silhouette — so it still reads as a solid object rather than a floating pane. Includes the rim-light border trick that keeps glass edges visible on both bright and dark imagery.

06. Light Source Consistency Across a Clay Layout (opens in a new tab)

Published

Pure CSS
A whole dashboard lit by one variable. Pick a light direction and every card, button, avatar and toggle re-lights together — highlights, inset walls and drop shadows all rotate in lockstep, because each shadow is expressed as a function of two shared offsets instead of hand-tuned per component. This is the discipline that separates a clay design system from a pile of pretty box-shadows.
Newsletter

Enjoying these demos? Get new ones by email.

A short email when a new collection ships. Unsubscribe any time.

at

Almost there: check your inbox to confirm.Manage

07. Clay Depth Tiers for Visual Hierarchy (opens in a new tab)

Published

Pure CSS
Four elevation tiers — inset well, resting, raised, floating — driven by a single --elev number per element. Every shadow length, blur and highlight strength is computed from it with calc(), so a component changes tier by changing one integer. Hover promotes a card one tier, which is how clay communicates interactivity without borders or color changes.

08. Tailwind CSS Claymorphism Implementation (opens in a new tab)

Published

Pure CSS
Claymorphism in Tailwind, both ways: the arbitrary-value one-liner you paste into a className today, and the Tailwind v4 @theme token you should ship in a real project. The panel prints the exact utility strings next to live components. The demo renders in plain CSS mirroring Tailwind's compiled output, so it runs in any playground without a build step.

09. Clay Button Press and Squish States (opens in a new tab)

Published

Pure CSS
Five clay buttons with a real physical press: on :active the object squashes on the Y axis, the drop shadow collapses, and the inset layers invert so the surface genuinely looks depressed. Includes the animator's squash-and-stretch release — the button overshoots slightly on the way back up — plus an icon button, a pill, a destructive variant and a disabled state, all keyboard-operable.

10. Clay Toggle Switch and Checkbox Set (opens in a new tab)

Published

Pure CSS
A complete clay form-control set: a switch whose track is an inset well and whose knob is a puffy clay pebble, checkboxes with a drawn-on tick, and a segmented radio group with a sliding clay thumb. All native inputs — real focus rings, real keyboard, real screen-reader state — with no appearance:none hacks beyond the visually-hidden pattern.

Published

Pure CSS
Inputs are the one place clay inverts: a field you type into must be a well, not a lifted object. This set gets it right — an inset search bar with a suggestion tray on focus, a floating-label field, a textarea that grows with field-sizing:content, and validation styled with :user-invalid so errors appear only after the user finishes.

12. Clay Badge & Pill Tag System (opens in a new tab)

Published

Pure CSS
A full badge and tag system at clay scale: status badges with semantic hues, count bubbles that sit on an avatar, removable filter tags that vanish on click with pure CSS, and a size scale from 20px micro-dot to 40px pill. The lesson here is scale discipline — the three-layer recipe has to be re-tuned, not shrunk, once an object drops below ~32px.

13. Claymorphism Card Component (opens in a new tab)

Published

Pure CSS
The workhorse: a clay content card with a real photo, nested concentric radii, a clay avatar row, and a hover lift that promotes the card exactly one depth tier. It is also container-query driven — the same card switches from stacked to side-by-side based on its own width, not the viewport, so it drops into a sidebar or a full-width grid unchanged.

14. Clay Modal Dialog with Floating Depth (opens in a new tab)

Published

Pure CSS
A top-tier clay dialog built on the native popover API — no focus-trap library, no aria-modal hand-wiring. The browser handles the top layer, light dismiss, Escape and focus. Clay does the rest: tier-4 depth, a blurred scrim, and an entry that scales from 0.94 with @starting-style, plus a matching exit.
Newsletter

Enjoying these demos? Get new ones by email.

A short email when a new collection ships. Unsubscribe any time.

at

Almost there: check your inbox to confirm.Manage

Published

Pure CSS
Three plans where hierarchy is built from depth instead of a coloured border: the popular tier sits a full elevation tier above its neighbours, is physically larger, and carries a floating clay ribbon. The monthly/yearly switch is pure CSS — a checkbox drives both prices and the saving badge through :has(), so the price actually changes with no script.

16. Clay Bottom Tab Bar for Mobile (opens in a new tab)

Published

Pure CSS
A floating clay dock with five destinations, a sliding puffy indicator, and the two things production tab bars must get right: env(safe-area-inset-bottom) so it clears the iPhone home bar, and 44px+ hit targets with labels that stay legible at the smallest text size. The indicator and label reveal are driven by radios and :has(), and the active tab is announced natively.

17. Clay Icon Tiles and App Grid (opens in a new tab)

Published

Pure CSS
Nine clay app tiles on a squircle grid, each hue generated from a single --h value, with a 3D perspective tilt on hover and a staggered load-in that uses only animation-delay derived from each tile's index. This is the pattern that sells claymorphism — playful, tactile, and cheap enough to render at 60 fps on a phone.

18. Clay Toast & Floating Alert Bubbles (opens in a new tab)

Published

Pure CSS
Four semantic clay toasts — success, info, warning, error — each dismissible in pure CSS, plus a chat-style alert bubble with an asymmetric tail. Entry is a spring from below with a staggered delay; dismissal collapses the toast's height so the stack closes the gap. Semantics are handled properly: role="status" for the polite ones, role="alert" for the error.

19. Clay Dark Mode Shadow Recalibration (opens in a new tab)

Published

Pure CSS
Dark mode is where naive clay dies: black shadows on a dark page are invisible, so the object flattens. This demo recalibrates all three layers for dark — a near-black drop with higher alpha, a much weaker inset shade, and a top rim highlight that becomes the primary depth cue — and ships both themes from one token block using light-dark(), with a clay switch to compare instantly.

20. Clay Animation Performance & Transform Optimization (opens in a new tab)

Published

Light JS
Measure it, do not guess. Twenty-four clay tiles animate under a live FPS meter in two modes: the naive one animates box-shadow blur directly, the optimized one pre-renders both shadow states and cross-fades a pseudo-element while transform does the motion. The frame counter and long-frame tally are real, and the gap is visible on screen.
FAQ

Frequently asked questions

What is claymorphism in CSS?
Claymorphism is the puffy, pastel, soft-3D style where every surface looks like it was moulded from clay — large rounded corners, saturated but gentle colours, and objects that appear inflated and floating slightly above the page. In CSS it comes down to one box-shadow declaration carrying three layers at once: a large soft outer shadow that lifts the object off the background, an inset shadow on the side away from the light that gives it volume, and an inset highlight on the lit side that makes the surface look rounded rather than flat. Drop any one of the three and the effect collapses — outer only reads as a plain floating card, insets only reads as a pressed well. Demo 01 assembles all three one step at a time so you can see exactly what each layer contributes.
What is the difference between claymorphism and neumorphism?
They are opposites, which is why swapping one for the other never works. Neumorphism is a same-background mirrored shadow pair: the element is exactly the colour of its parent, a dark shadow falls one way and a light shadow the other, and the illusion is that the surface was extruded out of the page. Nothing floats, and the moment the element's colour differs from its parent the effect dies. Claymorphism is the reverse — the object is a different, usually saturated colour from its ground, it has a genuine outer drop shadow so it clearly floats above the page, and its two inset shadows inflate it rather than blending it in. Practically: neumorphism needs a flat ground the same colour as the element, clay works on any ground and wants contrast. Neumorphism also has a well-known contrast problem at its boundary; clay largely avoids it because the object is a different colour to begin with. Demo 04 renders both side by side on the same background, labelled.
How do you write the claymorphism box-shadow?
As a single declaration with three comma-separated layers, in this order: the outer drop shadow first, then the dark inset, then the light inset. Something like box-shadow: 0 18px 32px -12px [tinted-dark], inset -8px -8px 16px [shade], inset 8px 8px 16px [highlight]. Three details separate a convincing result from a muddy one. The outer shadow should be tinted toward the object's own hue rather than neutral grey or black, which is what makes clay feel warm instead of dirty. The inset offsets must point in opposite directions and agree with wherever you decided the light is coming from. And the highlight wants to be lighter and slightly more transparent than the shade is dark, because a symmetrical pair reads as plastic. Demos 01 and 02 cover the assembly and the inset pair specifically.
What border radius should claymorphism use?
Larger than feels right at first, and scaled to the element rather than fixed. A puffy shape generally needs a radius somewhere around a third of the element's smaller dimension — a 48px button wants roughly 16px, a 300px card wants far more than the 12px a normal card would take. The failure mode is applying one radius token across every size, which leaves small controls looking merely rounded while large surfaces look under-inflated. The second rule is that inset shadow blur must stay proportional to the radius: a large radius with a tight inset produces a hard rim rather than a soft roll, and a small element with a large inset blur has no room to resolve the highlight at all, which is why clay badges under about 24px tall usually need the inset dropped entirely. Demo 03 walks the scale, and demo 12 shows where the badge floor sits.
How do you do claymorphism in Tailwind CSS?
Two ways, and which one you want depends on whether you are prototyping or shipping. For a quick result, the whole effect fits in a single arbitrary-value utility — a shadow-[...] with all three layers comma-separated inside the brackets, paired with a generous rounded-* and a background colour. That is fine in a playground but unreadable in a codebase and impossible to keep consistent across a team. For real work, define the shadow once as a theme token — in Tailwind v4 that means a @theme entry — and use it as a named utility everywhere, so the light direction and blur scale stay identical across every clay surface in the project. Demo 08 prints the exact strings for both approaches next to live components, and the demo itself renders in plain CSS mirroring the compiled output so it runs without a build step.
Why does claymorphism look wrong in dark mode?
Because inverting a light clay palette produces mud, for the same reason it does in neumorphism but with an extra complication: clay's outer shadow is tinted to the object's hue, and a tinted shadow that worked on a pale ground turns into a dirty smear on a dark one. Three adjustments fix it. The outer shadow needs to become both darker and considerably more transparent, since on a dark background it is doing far less work — the object separates by lightness instead. The inset highlight has to be dimmed and tightened, because a bright highlight that read as a soft roll on pastel reads as a hard plastic glare on a dark surface. And depth should come partly from fill lightness rather than shadow alone, raising each tier's surface lightness a few percent, since shadows cannot carry four distinct depth tiers on a dark page. Demo 19 puts the naive inversion beside a properly recalibrated set.
Is animating box-shadow bad for performance?
Yes, and clay makes it worse than most styles because every surface carries three shadow layers instead of one. Animating box-shadow forces a repaint on every frame, and a grid of clay tiles all transitioning their blur will drop frames on a mid-range phone even though it looks fine on a desktop. The fix is to avoid animating the shadow at all: put the motion on transform, which the compositor handles without repainting, and if the shadow genuinely must change, pre-render both states on stacked pseudo-elements and cross-fade their opacity instead of interpolating blur radii. Demo 20 runs both approaches under a live FPS meter with a long-frame counter so the difference is measured rather than asserted.
Is claymorphism accessible?
It starts from a better position than neumorphism, because a clay object is a different colour from its background and therefore has a real boundary — which is exactly what neumorphism lacks. The risks are elsewhere. Pastel palettes drift toward low text contrast, so body text on a clay surface still needs the full 4.5:1 and large text 3:1; a soft lilac label on a soft lilac card fails easily. Interactive boundaries need 3:1 under WCAG 2.2 SC 1.4.11, and a shadow does not supply it, so keep a real edge on controls. Do not signal state through depth alone — a raised-versus-pressed shadow change is not perceivable to everyone and needs a colour, text or icon change alongside it. And :focus-visible should be a genuine visible ring rather than a shadow swap. Demo 09 keeps a real focus ring through the press states, and demo 08's contrast notes cover the palette side.

Related collections

20 CSS 3D Effects preview

20 CSS 3D Effects

20 hand-coded CSS 3D patterns covering the transform pipeline reference build, the perspective property versus the perspective function, perspective-origin as the camera position, why transform function order changes the result, backface-visibility on two sided elements, what silently flattens preserve-3d, building a cube from six faces, transform-origin in three dimensions, translateZ versus scale for depth, z-fighting on coplanar surfaces, rotate3d and the transform matrix, plus ring layouts, stacked z-planes, pointer tilt with parallax, a hinged page-turn flipbook, a drag-rotate cube navigator, an extruded synth panel, perspective floor geometry, nested 3D contexts, and helix distribution. 14 demos are pure CSS; 6 use vanilla JavaScript.

22 CSS Brutalism preview

22 CSS Brutalism

22 hand-coded brutalist and neubrutalist CSS designs covering the full spectrum of the aesthetic — from the anti-design brutalism of 2014-2018 (raw system fonts, zero border radius, monochrome density, visible structure) through to the neubrutalism of 2021-present (bright pastel fills, thick black borders, hard offset shadows with zero blur, rounded blocks). The neubrutalist half ships SaaS pricing cards with sticker badges, a pastel admin dashboard, signup forms, rotated feature cards, an offset-shadow navbar, a playful button set, a native dialog modal, a testimonial wall, blog cards, chunky toggles, a landing hero, an image gallery, stats panels and a rounded footer. The brutalist half covers product grids, raw form controls, a monochrome data dashboard, a portfolio index, indie SaaS pricing, Windows 95 desktop chrome, editorial long-read and a streetwear catalog. Every design is scoped under a .brt-NN prefix for no-collision pasting, guards prefers-reduced-motion, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.

22 CSS Dark Mode UI preview

22 CSS Dark Mode UI

22 hand-coded CSS dark-mode UI patterns — prefers-color-scheme root strategy, data-theme attribute override, color-mix token system, light-dark() function, sidebar navigation, dashboard card grid, modal dialog, focus-ring contrast audit, three-state switcher, code editor surface, OLED true black, layered slate, aurora dim and more.

Search CodeFronts

Loading…