Back to Content

SVGRect: width property

files/en-us/web/api/svgrect/width/index.md

latest673 B
Original Source

{{APIRef("SVG")}}

The width property of the {{domxref("SVGRect")}} interface is an alias for the {{DOMXref("DOMRect.width")}} property. It describes the horizontal size of the element. It reflects the SVG element's {{SVGattr("width")}} attribute and the CSS {{cssxref("width")}} property.

The width is a length; it is the distance from the left of element to the right of the element in the user coordinate system. Its syntax is the same as that for <length>.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{DOMXref("DOMRect.width")}}
  • {{domxref("SVGRect.height")}}