---
title: "Drop Shadow: Settings and How to Make One Look Realistic - CE.SDK Glossary"
description: "A drop shadow is a soft, offset copy of an object drawn behind it. Set the light, distance and blur yourself, compare tool settings and make shadows look real."
url: "https://img.ly/glossary/drop-shadow/"
type: "page"
---

> This is the markdown version of [Drop Shadow: Settings and How to Make One Look Realistic - CE.SDK Glossary](https://img.ly/glossary/drop-shadow/). For all pages in one file, see [llms-full.txt](https://img.ly/llms-full.txt). For an index of all available pages, see [llms.txt](https://img.ly/llms.txt).

---

# Drop Shadow

## What Is a Drop Shadow?

A drop shadow is a copy of an object's shape in a dark color, offset and drawn behind it, so the object seems to float above the background. Blurring the copy's edges and darkening only what lies underneath make it look like a shadow cast by a light.

Interfaces put drop shadows on windows, menus and buttons, and designers add them to text and icons that have to stand out from any background. A shadow can follow the object's outline or only the box around it, and a cutout with gaps, like the mug below, shows the difference best.

### Cast a shadow yourself

Move the light, then change how far and how soft the shadow falls. Switch the shadow between the shape and the box to see what a cutout needs.

The tool casts a shadow behind a mug cutout, a word or a card, with the light direction, distance, blur and opacity set on sliders, and switches the shadow between following the shape and following the element's box. With the starting settings, the readout says: "Light from the upper left puts the shadow 12 px toward the lower right. drop-shadow() follows the mug's outline, through the gap in the handle too." The stage uses `filter: drop-shadow(8.49px 8.49px 8px rgb(0 0 0 / 0.35));`. CE.SDK offsets for this light and distance: x 8.49, y 8.49.

## How Do You Make a Drop Shadow Look Realistic?

A realistic drop shadow behaves like a shadow from a real light: it falls away from one light source, grows softer as the object rises and is tinted by the surface below it.

### One light source for every shadow

Every shadow on a page should fall in the same direction, as if a single light lit the whole scene, and designers usually place that light above the page, often a little to the left. Photoshop's Use Global Light setting gives every layer style in a document the same angle.

### Higher objects cast larger, softer shadows

The higher an object floats above a surface, the bigger and blurrier its shadow becomes. Android draws shadows from each view's elevation this way, and a page can use the same rule to show what sits on top: a dialog gets a wider, softer shadow than a card resting on the page.

### A darker surface color instead of black

A black shadow at low opacity grays out the color it falls on, while a darker version of the surface color keeps the surface's hue. Photoshop drop shadows use the [Multiply blend mode](https://img.ly/glossary/blend-modes.md), which only darkens what lies below. Switch the tool's color to Surface tint to compare.

### Two or three stacked shadows

A single shadow can look flat. Stacking two or three, each with a larger offset and blur than the one before, gives a smoother falloff, and CSS takes a comma-separated list in box-shadow and text-shadow, or several drop-shadow() functions in one filter.

## What Are the Settings of a Drop Shadow?

Every tool sets the same things under its own names: where the shadow falls, how soft its edge is and how strong it is, plus a spread setting in most. Photoshop asks for an angle and a distance, while Figma and CSS take separate horizontal and vertical offsets.

- **Direction and distance**: Photoshop: Angle and Distance, CSS: offset-x and offset-y

- **Softness**: Photoshop: Size, CSS: blur radius

- **Spread**: Photoshop: Spread, CSS: spread radius, box-shadow only

- **Strength**: Photoshop: Opacity, CSS: color alpha

Spread doesn't work the same way everywhere. In CSS, a positive spread radius makes a box shadow bigger and a negative one smaller, while Photoshop's Spread makes the shadow denser. Figma names its settings X, Y, Blur and Spread, and offers Spread only on rectangles, ellipses, frames and components.

## Drop Shadow or Box Shadow in CSS: Which Should You Use?

Use drop-shadow() when the shadow should follow what you see and box-shadow when it should follow the element's rectangle. An online store's product grid can use both, with drop-shadow() on the product cutouts so each shadow traces the product and box-shadow on the cards around them. For text, text-shadow follows the letters and takes the same values as box-shadow, without spread or inset.

### Use drop-shadow() for

- **Product cutouts and other images with transparent areas**

- **Icons, logos and SVG shapes that aren't rectangles**

### Use box-shadow for

- **Cards, buttons, menus and dialogs, which are rectangles anyway**

- **Spread and inner shadows, which drop-shadow() doesn't draw**

## How Drop Shadows Work in CE.SDK

Text, shape and image blocks each have a shadow, and your users turn it on in the [CE.SDK](https://img.ly/products/creative-sdk.md) editor and set its color and opacity, its angle and distance, and its blur. The shadow is a property of the block, apart from the [effects](https://img.ly/glossary/effects.md) a block stacks, and it is off by default, set to black at 25% opacity.

It follows the visible shape, so the shadow of an image with transparent areas, such as a product photo after [background removal](https://img.ly/glossary/background-removal-plugin.md), traces the product. Shadows can also use [CMYK](https://img.ly/glossary/cmyk.md) or spot colors in print designs, and an SVG export embeds the shadow as an image. For a glow on an image or shape, CE.SDK has a separate glow effect, while [glowing text](https://img.ly/glossary/text-effects.md) uses a drop shadow with no offset.

In code, positive offsets move the shadow right and down, and the same calls exist on iOS, Android and in Node.js. The function here points every shadow in a scene away from one light and keeps each shadow's distance.

**Point every shadow away from one light**

```javascript
// Point every shadow in the scene away from one light.
// lightAngle says where the light comes from, in degrees:
// 0 is from the right, 90 from above, 180 from the left.
function relight(lightAngle) {
  const radians = (lightAngle * Math.PI) / 180;
  for (const block of engine.block.findAll()) {
    if (!engine.block.supportsDropShadow(block)) continue;
    if (!engine.block.isDropShadowEnabled(block)) continue;
    // Keep how far each shadow sits from its block.
    const distance = Math.hypot(
      engine.block.getDropShadowOffsetX(block),
      engine.block.getDropShadowOffsetY(block)
    );
    // The shadow falls away from the light; positive y is down.
    const x = -distance * Math.cos(radians);
    const y = distance * Math.sin(radians);
    engine.block.setDropShadowOffsetX(block, x);
    engine.block.setDropShadowOffsetY(block, y);
  }
}
relight(135); // light from the upper left
```

[Shadows and glows guide](https://img.ly/docs/cesdk/js/outlines/shadows-and-glows-6610fa.md)

## FAQs

### Drop Shadow

**Q: What is the difference between a drop shadow and an inner shadow?**

A: A drop shadow sits outside the object and makes it look raised above the background. An inner shadow is drawn inside the edges, so the object looks pressed into the surface. In CSS, box-shadow draws an inner shadow with the inset keyword, and Figma lists inner shadow as an effect of its own.

**Q: Which direction should a drop shadow fall?**

A: Away from the light, and every shadow on the page should fall the same way. Designers usually put the light above the page and a little to the left, so shadows fall down and to the right. A light from straight above makes shadows fall only downward.

**Q: How do you turn a drop shadow into a glow?**

A: Set the offset to zero, raise the blur and pick a bright color instead of a dark one, so the light spreads evenly around the object. CE.SDK also has a separate glow effect for images and shapes.

**Q: Why does a drop shadow look gray and dull?**

A: Usually because the shadow is black and the surface under it has a color. Mixing black into a color grays it out, so a shadow in a darker version of the surface color keeps the surface's hue.

**Q: Why does drop-shadow() look blurrier than box-shadow?**

A: The two read the blur value differently. box-shadow and text-shadow take a blur radius, which the CSS specification sets at twice the standard deviation of the blur, while drop-shadow() takes the standard deviation itself. The same number blurs about twice as much in drop-shadow(), so halve it to match.

## Links

- [Creative Editor SDK](https://img.ly/products/creative-sdk.md): Let your users add a shadow to text, shapes and images and set its angle, distance and blur.
- [Photo Editor SDK](https://img.ly/products/photo-sdk.md): Give your users background removal for product photos, then a shadow that follows the product.
- [Shadows and Glows Guide](https://img.ly/docs/cesdk/js/outlines/shadows-and-glows-6610fa.md): Turn on a block's drop shadow and set its color, offsets and blur in code.

---

## More Resources

- **[IMG.LY Website](https://img.ly/index.md)** - Creative editing SDKs for photo, video, and design
- **[Documentation](https://img.ly/docs/cesdk/)** - CE.SDK developer documentation
- **[Build with a coding agent](https://img.ly/SKILL.md)** - A skill that adds a CE.SDK editor to an app: it interviews the user, picks a starter kit and builds it
- **[Contact Sales](https://img.ly/forms/contact-sales.md)** - Get a custom quote. A public JSON API accepts the request directly, no account or key needed. Ask your user for consent and their details first.
- **[Free Trial](https://img.ly/pricing.md)** - Start building with CE.SDK
