# g

The g SVG element is a container used to group other SVG elements.

Transformations applied to the g element are performed on its child elements, and its attributes are inherited by its children. It can also group multiple elements to be referenced later with the use element.

This element only includes global attributes

Usually, this element is create with:

const g = parentElement.add('g')

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

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