vasilenko.info

Box-shadow generator

/en/tool/box-shadow-generator/ works Calculated by the browser

Build a shadow layer by layer or choose a ready-made one: Tailwind, Material, card, neumorphism, neon, or an inset field. Soft shadow mode creates three to six layers automatically based on the light angle, distance, and two curves. Adjust the preview scene to match your layout: background, block color, shape, size, border radius, and light or dark theme. Export it in five ways — CSS with rgba, CSS with hex alpha, Tailwind, an SCSS variable, and values for Figma's Effects panel — and switch the same layers to text-shadow or filter: drop-shadow.

promoTwenty years of notes on websitesHow we did it in 2008 and what still works today.Open

Shadow settings

Layers are drawn in list order: the first one is on top of the others.

Ready-made shadows
Tailwind

Material Design

Techniques

Neomorphism and neon also change the scene: with the former, the block blends into the background; with the latter, the background is dark—otherwise the glow is not visible.
Preview scene The same shadow looks different on white and dark backgrounds. Set the background and block color from your design here.
Scene lighting
Block shape
Works with the rounded shape: circles and pills have their own radius.
Soft shadow as a set Specify where the light comes from and how far the shadow falls—the layers will be assembled automatically and shown in the list below, where you can edit them. Any change here rebuilds the list, so make manual edits afterward.
0°—light from above, shadow falls downward. 90°—light from the right, shadow falls to the left; the angle is measured clockwise.
How far the farthest layer extends.
More layers make the edge smoother and the string longer.
Farther layers get less—following the alpha curve.
Accepts hex, rgb(), rgba(), hsl(), and hsla().
Blur curve
Alpha curve
Layers

How it looks

block

Property

Output format

box-shadow CSS · rgba
box-shadow: none;

The browser calculates it. No colors or slider values are sent anywhere: after the page loads, it makes no requests. The layer set is stored in the page URL— copy the link, and your colleague will see exactly the same shadow.

promoCalculate ROI at the same timeCampaign payback based on spend and revenue.Open

How to use it

  1. The fastest approach is to take a ready-made shadow from the tiles above. Tailwind and Material use the values found in the frameworks; “card,” “floating,” “neomorphism,” “neon,” and “inset field” are techniques people search for most often.

  2. For a custom option, it is easiest to start with a soft shadow: the light angle determines where it falls, the distance determines how far, and the number of layers determines how smooth the edge is. The curves control how quickly the blur grows and how quickly the alpha fades.

  3. Then adjust the layers manually. Each slider has a numeric field: use the mouse to find a value and the keyboard to enter an exact one. You can move a layer up or down, duplicate it, and temporarily disable it without deleting it.

  4. Adjust the scene to match your layout: enter the background on which the shadow will appear in “background color.” On a dark background, a black shadow is not visible at all—use either a colored glow or a very dense shadow instead.

  5. The “Pick from background” button for each layer colors the shadow with a shade of the background and darkens it. Pure black over a colored background creates a gray spot—the most common cause of a “dirty” shadow.

  6. The property switcher combines the same layers into text-shadow or filter: drop-shadow. Spread and inset are not transferred—neither property has these parameters, and the panel reports this.

  7. Take the result in the format you need: CSS, Tailwind in the form shadow-[…], an SCSS variable, or values for the Effects panel in Figma. The “Download as file” button returns the same result as a file, while “Set link” provides an address that opens the set for a colleague.

promoBrowser task listNo account required—everything is stored on your device.Open

The formula and what it includes

box-shadow: [inset] X Y blur spread color

Layers are listed with commas. The first layer in the list is drawn above the others, just like with background-image. text-shadow has only three parameters (X, Y, blur, and color), and drop-shadow has the same number; its layers are separated by spaces, not commas.

Example breakdown: a two-layer card shadow

The input data is the same as the default field values: you can calculate it mentally and confirm that the tool is telling the truth.

  1. The color is not pure black but dark blue #0F172A: it has a hue, so on a light gray background the shadow reads as a shadow rather than a gray sticker.

  2. #0F172A is R 15, G 23, B 42. Opacity 6% is alpha 6 ÷ 100 = 0.06, which gives rgba(15, 23, 42, 0.06).

  3. Zero values are written without units: 0, not 0px. A spread of 0 is omitted from the string entirely.

  4. First layer: 0 1px 2px rgba(15, 23, 42, 0.06). Second: 0 8px 24px rgba(15, 23, 42, 0.12).

  5. Layers are separated by commas. For two layers, the panel prints three lines: first “box-shadow:”, then each layer on a new line with indentation. One layer remains on a single line. Below, the same two layers are combined into one continuous line—for the browser, it is the same thing; the line breaks are only for readability.

  6. The same set in the hex tab looks like 0 1px 2px #0f172a0f: 0.06 × 255 ≈ 15, and 15 in hexadecimal is 0f.

box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.12);

Frequently asked questions

promoAll toolsForty-four tools, all running in your browser.Open

Related tools

5