Please guide me in using SVG/Icons given in Lightning Design system in Lightning component. Is it through ltng:require?


I need to refer SVGs in the LDS Bundle(static resource).

1 Answer 1

<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"

<svg xmlns="http://www.w3.org/2000/svg"
     width="400" height="400">
  <circle cx="100" cy="100" r="50" stroke="black"
    stroke-width="5" fill="red" />

Here is an sample code for you.

Reference 1

Reference 2

  • where should I add this DOCTYPE declaration? How to refer SVGs provided in LDS?
    – Vignex
    Commented Jan 7, 2016 at 10:48
  • I already added reference 2. Please check. Commented Jan 7, 2016 at 10:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .