Creates an SVG group element to group other SVG elements together.
The Layer component is useful when you want to apply transformations or styles to a set of elements without affecting other elements in the SVG. It wraps the standard SVG g element.
Props
Appearance
CSS class name to apply to the group element.
Content
SVG elements to group together.
SVG properties
This component accepts all standard SVG g element attributes including:
transform - Transformation to apply to the group
opacity - Opacity for all children
style - Inline styles
All SVG g element event handlers are also supported (onClick, onMouseEnter, etc.).
Examples
Basic grouping
With shared opacity