<- all tokdocs

Four-Layer CSS Box Shadow Buttons: Do Premium SaaS Sites Use Them?

By , founder of Mavric and Apso

View on TikTok ->

A TikTok from @aniakubow (Ania Kubów) shows how to make a button look "premium" by stacking four box-shadow layers, two of them light, on top of a top-to-bottom gradient. The CSS is valid and renders exactly as described in Chrome. The claim that premium SaaS buttons look like this does not hold everywhere: Stripe's homepage buttons have no shadow at all, and Linear's primary buttons use five dark layers.

The four-shadow button CSS

The full code from the video:

.btn {
  background: linear-gradient(#7c7cff, #5b5bf0);
  box-shadow: inset 0 1px 0 #ffffff59,
    inset 0 -2px 0 #0003,
    0 1px 2px #0006,
    0 8px 24px -6px #5b5bf099;
}

.btn:active {
  translate: 0 1px;
  box-shadow: inset 0 2px 4px #0004;
}

The video labels the four layers "1 top light," "2 bottom shade," "3 contact" and "4 glow":

  1. Top light: inset 0 1px 0 #ffffff59, a white line inside the top edge at 35 percent opacity.
  2. Bottom shade: inset 0 -2px 0 #0003, a dark line inside the bottom edge at 20 percent.
  3. Contact shadow: 0 1px 2px #0006, a tight shadow where the button meets the page, at 40 percent black.
  4. Glow: 0 8px 24px -6px #5b5bf099, a soft shadow in the button's own purple at 60 percent.

Is this CSS valid?

Yes. MDN documents each part:

  • box-shadow accepts a comma-separated list, and "the first specified shadow is on top," so the white highlight paints over the others.
  • inset "changes the shadow from an outer box-shadow to an inner box-shadow," and inset shadows "appear above the background but below the content," so the highlight sits over the gradient without covering the label.
  • A negative spread, like -6px, makes the shadow shrink, which keeps the 24px glow tucked under the button.
  • 4- and 8-digit hex colors carry alpha. #0003 expands to #00000033, and 00 is transparent while ff is opaque.
  • linear-gradient() with no angle "defaults to to bottom," so the button is lighter at the top.

Loaded into headless Chrome 131, the computed style kept all four layers: rgba(255, 255, 255, 0.35) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.2) 0px -2px 0px 0px inset, rgba(0, 0, 0, 0.4) 0px 1px 2px 0px, rgba(91, 91, 240, 0.6) 0px 8px 24px -6px. box-shadow has been Baseline widely available since July 2015.

Do premium SaaS buttons use four shadows?

Not consistently. The video compares "yours" to an unnamed "premium saas" button. Two real sites, checked on 2026-10-19:

Stripe. Every "Start now," "Get started" and "Contact sales" button on stripe.com computed to box-shadow: none, background-image: none, a flat rgb(83, 58, 253) fill and a 4px radius. Stripe's main call to action is a flat, single-color button.

Linear. The "Get started," "Sign up" and "Open app" buttons on linear.app share five black shadow layers on a light grey rgb(229, 229, 230) pill, with no inset highlight and no colored glow. Linear's secondary "Contact sales" button is closest to the video's recipe: four layers, two of them inset white (at 3 and 4 percent), a 1px black ring at 60 percent, and a 0 4px 4px drop at 10 percent.

Layered shadows with light insets do appear on real SaaS sites, but so do flat buttons with none. The four-shadow style is one design choice among several.

Are two of the layers "not real shadows"?

The video says premium buttons "have four, and two aren't even real shadows." In CSS, all four are box-shadow layers. What the video describes is a lighting model: a highlight where light from above hits the top edge, shade on the bottom face, a contact shadow on the page, and bounced color around the button. The values match that idea, since only the top layer is white. Treat "not real shadows" as a design explanation, not a CSS property.

Stacking several shadows to imitate one light source has precedent. Josh Comeau's "Designing Beautiful Shadows in CSS," first published 2021-09-13, says: "Instead of using a single box-shadow, we'll stack a handful on top of each other, with slightly-different offsets and radiuses." His article covers outer shadows only, so the inset highlight and shade pairing goes beyond it.

How does the pressed state work?

The video says "on press flip it, highlight gone." The .btn:active rule moves the button down 1px with translate: 0 1px and replaces all four layers with one inset 0 2px 4px #0004, a 27 percent black shadow inside the top edge. Chrome computed it as translate: 0px 1px; box-shadow: rgba(0, 0, 0, 0.267) 0px 2px 4px inset.

The standalone translate property has been Baseline widely available since August 2022. In an older browser, the shadow still changes on press but the button does not move, because the browser drops the unknown declaration. transform: translateY(1px) is the long-supported alternative.

Who made the video?

Ania Kubów is a software developer who runs the YouTube channel Code with Ania Kubów and has appeared on the freeCodeCamp podcast, episode 187. The TikTok's only description is "Do you agree?"

Bottom line

The four-layer button CSS is valid, well supported and renders as shown. Use it if you want a lit, dimensional button, and swap translate for transform: translateY(1px) if you support older browsers. Do not assume premium sites require it: Stripe's homepage uses a flat button with no shadow.

Sources

Published October 14, 2026. Based on a TikTok by @aniakubow. Full video notes (markdown)