GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • MDN
  • HTML: Markup language
  • Elements
  • Global attributes
  • Attributes
  • See all…
  • Responsive images
  • HTML cheatsheet
  • Date & time formats
  • See all…
  • SVG
  • MathML
  • XML
  • CSS: Styling language

This view

  • Original page
  • New address

GeezerVison is showing developer.mozilla.org — <feDropShadow> - SVG | MDN

<feDropShadow>

Baseline
Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

  • See full compatibility
  • Learn more

The <feDropShadow> SVG filter primitive creates a drop shadow of the input image. It can only be used inside a <filter> element.

Note: The drop shadow color and opacity can be changed by using the flood-color and flood-opacity presentation attributes.

Like other filter primitives, it handles color components in the linearRGB color space by default. You can use color-interpolation-filters to use sRGB instead.

Usage context

CategoriesFilter primitive element
Permitted contentAny number of the following elements, in any order:
<animate>, <script>, <set>

Attributes

  • dx: This attribute defines the x offset of the drop shadow. Value type: <number>; Default value: 2; Animatable: yes
  • dy: This attribute defines the y offset of the drop shadow. Value type: <number>; Default value: 2; Animatable: yes
  • in
  • stdDeviation: This attribute defines the standard deviation for the blur operation in the drop shadow. Value type: <number-optional-number>; Default value: 2; Animatable: yes
  • Filter primitive attributes: x, y, width, height, result

DOM Interface

This element implements the SVGFEDropShadowElement interface.

Example

html,
body,
svg {
  height: 100%;
}
html
<svg viewBox="0 0 30 10" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <filter id="shadow">
      <feDropShadow dx="0.2" dy="0.4" stdDeviation="0.2" />
    </filter>
    <filter id="shadow2">
      <feDropShadow dx="0" dy="0" stdDeviation="0.5" flood-color="cyan" />
    </filter>
    <filter id="shadow3">
      <feDropShadow
        dx="-0.8"
        dy="-0.8"
        stdDeviation="0"
        flood-color="pink"
        flood-opacity="0.5" />
    </filter>
  </defs>

  <circle cx="5" cy="50%" r="4" fill="pink" filter="url(#shadow)" />
  <circle cx="15" cy="50%" r="4" fill="pink" filter="url(#shadow2)" />
  <circle cx="25" cy="50%" r="4" fill="pink" filter="url(#shadow3)" />
</svg>

Specifications

Specification
Filter Effects Module Level 1
# feDropShadowElement

Browser compatibility

See also

  • SVG Filter primitive attributes including height, in, result, x, y, and width.
  • SVG presentation attributes, including flood-color, and flood-opacity.

Help improve MDN

Learn how to contribute

This page was last modified on Oct 28, 2025 by MDN contributors.

View this page on GitHub • Report a problem with this content
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.