# rect The **\** component is used to draw rectangles and rounded rectangles. > **NOTE** > > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. ## Required Permissions None ## Child Components The following are supported: [\](js-components-svg-animate.md), [\](js-components-svg-animatemotion.md), and [\](js-components-svg-animatetransform.md). ## Attributes The [universal attributes](../arkui-js/js-components-svg-common-attributes.md) and the attributes listed below are supported. | Name| Type| Default Value| Mandatory| Description| | -------- | -------- | -------- | -------- | -------- | | id | string | - | No| Unique ID of the component.| | width | <length>\|<percentage> | 0 | No| Width of the rectangle. Attribute animations are supported.| | height | <length>\|<percentage> | 0 | No| Height of the rectangle. Attribute animations are supported.| | x | <length>\|<percentage> | 0 | No| X-coordinate of the upper left corner of the rectangle. Attribute animations are supported.| | y | <length>\|<percentage> | 0 | No| Y-coordinate of the upper left corner of the rectangle. Attribute animations are supported.| | rx | <length>\|<percentage> | 0 | No| Radius of the rectangle rounded corner in the x-axis direction. Attribute animations are supported.| | ry | <length>\|<percentage> | 0 | No| Radius of the rectangle rounded corner in the y-axis direction. Attribute animations are supported.| ## Example ```html
``` ![0](figures/0.png)