Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The SVGPatternElement interface corresponds to the <pattern> element.
EventTarget Node Element SVGElement SVGPatternElementThis interface also inherits properties from its parent, SVGElement.
SVGPatternElement.href Read onlyAn SVGAnimatedString corresponding to the href or xlink:href attribute of the given <pattern> element.
SVGPatternElement.patternUnits Read onlyAn SVGAnimatedEnumeration corresponding to the patternUnits attribute of the given <pattern> element. Takes one of the constants defined in SVGUnitTypes.
SVGPatternElement.patternContentUnits Read onlyAn SVGAnimatedEnumeration corresponding to the patternContentUnits attribute of the given <pattern> element. Takes one of the constants defined in SVGUnitTypes.
SVGPatternElement.patternTransform Read onlyAn SVGAnimatedTransformList corresponding to the patternTransform attribute of the given <pattern> element.
SVGPatternElement.viewBox Read onlyAn SVGAnimatedRect corresponding to the viewBox attribute of the given <pattern> element.
SVGPatternElement.preserveAspectRatio Read onlyAn SVGAnimatedPreserveAspectRatio corresponding to the preserveAspectRatio attribute of the given <pattern> element.
SVGPatternElement.x Read onlyAn SVGAnimatedEnumeration corresponding to the x attribute of the given <pattern> element.
SVGPatternElement.y Read onlyAn SVGAnimatedEnumeration corresponding to the y attribute of the given <pattern> element.
SVGPatternElement.width Read onlyAn SVGAnimatedEnumeration corresponding to the width attribute of the given <pattern> element.
SVGPatternElement.height Read onlyAn SVGAnimatedEnumeration corresponding to the height attribute of the given <pattern> element.
This interface doesn't implement any specific methods, but inherits methods from its parent interface, SVGElement.
| Scalable Vector Graphics (SVG) 2 # InterfaceSVGPatternElement |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Feb 2, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.