2

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

EDIT:

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

1 Answer 1

5
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<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" />
</svg>

Here is an sample code for you.

Reference 1

Reference 2

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 .