Small tasks. A little easier.126 tools · No account required

Find your next tool

Search all 126 tools and their practical guides.

Design & social

Build a subtle card shadow and understand each length

Generate a concrete box-shadow declaration, compare offset, blur, and spread, and inspect it on the actual page background.

ERITHRA editorial3 min read

Adjust one property at a time

The CSS Box Shadow Generator creates a single outer shadow. Its fields correspond to horizontal offset, vertical offset, blur radius, spread, shadow color, and opacity. Generate the result to see a white sample card and copy the CSS declaration.

Horizontal and vertical offsets position the shadow. Positive horizontal values move it right; positive vertical values move it down. Blur softens the edge, while spread expands or contracts the shadow shape. These are separate effects, so changing only one control between previews makes it easier to see what each contributes.

Reproduce a restrained card treatment

Set Horizontal offset to 0, Vertical offset to 8, Blur radius to 24, Spread to 0, Shadow color to #000000, and Opacity to 0.15. The expected result is:

box-shadow: 0px 8px 24px 0px rgba(0, 0, 0, 0.15);

The preview shows a soft shadow below the card. Change horizontal offset to 8 and inspect the movement to the right. Return it to zero before comparing a spread of 4 against a spread of 0. This sequence helps isolate shape changes from position changes.

The tool permits offsets and spread from −100 through 100 pixels, blur from 0 through 200 pixels, and opacity from 0 through 1. The output can be downloaded as shadow.css; place the declaration inside the selector for your own card element.

Inspect the surrounding layout

A shadow’s appearance depends on the surface behind it. A value that looks subtle on a white preview may disappear against a dark background or look excessive on a saturated one. Test it on the actual page and at the card’s real size before adding it to a shared component style.

The CSS Backgrounds and Borders specification defines box shadows and their painting behavior. Shadows do not reserve layout space, so a nearby element or an ancestor’s clipping can make the result look different from this isolated preview.

Use shadows as an additional cue

Do not rely on a faint shadow alone to communicate a required field, keyboard focus, or an error. Pair meaningful states with clear structure and appropriate visible indicators. This generator does not assess accessibility or design-system consistency.

It produces one outer shadow without inset or multiple-layer controls. Those can be added manually if needed. Generation happens locally in the browser. For another background treatment, explore CSS Gradient Generator and check the combined effect in the final layout.

CSSshadowsinterface design

Put it into practice

Keep reading