# defs

The defs element is used to store graphical objects that will be used at a later time. Objects created inside a defs element are not rendered directly. To display them you have to reference them (with a use element for example).

Usually, this element is create with:

const defs = parentElement.add('defs')

It's possible create as a disconnected element with gySVG('defs') and attach it to the SVG document with .attachTo().

More info: mdn (opens new window) | w3c (opens new window)