The <feSpotLight> SVG filter primitive allows to create a spotlight effect.

Usage context

CategoriesLight source element
Permitted contentAny number of the following elements, in any order:
<animate>, <set>


Global attributes

Specific attributes

DOM Interface

This element implements the SVGFESpotLightElement interface.


HTML Content

<svg width="200" height="200" xmlns=""
    <filter id="spotlight">
      <feSpecularLighting result="spotlight" specularConstant="1.5"
          specularExponent="4" lighting-color="#FFF">
        <feSpotLight x="600" y="600" z="400" limitingConeAngle="5.5" />
      <feComposite in="SourceGraphic" in2="spotlight" operator="out"
          k1="0" k2="1" k3="1" k4="0"/>

  <image xlink:href="/files/6457/mdn_logo_only_color.png" x="10%" y="10%"
      width="80%" height="80%" style="filter:url(#spotlight);"/>



Specification Status Comment
Filter Effects Module Level 1
The definition of '<feSpotLight>' in that specification.
Working Draft No change
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of '<feSpotLight>' in that specification.
Recommendation Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes Yes4 Yes9 ?
limitingConeAngle Yes Yes4 Yes9 ?
pointsAtX Yes Yes4 Yes9 ?
pointsAtY Yes Yes4 Yes9 ?
pointsAtZ Yes Yes4 Yes9 ?
specularExponent Yes Yes4 Yes9 ?
x Yes Yes4 Yes9 ?
y Yes Yes4 Yes9 ?
z Yes Yes4 Yes9 ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? Yes Yes Yes ? ? ?
limitingConeAngle ? Yes Yes Yes ? ? ?
pointsAtX ? Yes Yes Yes ? ? ?
pointsAtY ? Yes Yes Yes ? ? ?
pointsAtZ ? Yes Yes Yes ? ? ?
specularExponent ? Yes Yes Yes ? ? ?
x ? Yes Yes Yes ? ? ?
y ? Yes Yes Yes ? ? ?
z ? Yes Yes Yes ? ? ?

See also

Document Tags and Contributors

Contributors to this page: Jeremie, abbycar, Sebastianz, iwarui, JuliaM, kscarfone, Manuel_Strehl
Last updated by: Jeremie,