# svg The **\** component is a basic container. It can be used as the root node of an SVG document or be used to nest an SVG fragment into an SVG document. > **NOTE** > - This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > > - The width and height must be defined for the **\** parent component or **\** component. Otherwise, the component is not drawn. ## Required Permissions None ## Child Components The following are supported: [\](js-components-svg.md), [\](js-components-svg-rect.md), [\](js-components-svg-circle.md), [\](../arkui-js/js-components-svg-ellipse.md), [\](js-components-svg-path.md), [\](../arkui-js/js-components-svg-polygon.md), [\](js-components-svg-polyline.md), [\](js-components-svg-text.md), [\](js-components-svg-animate.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. The configured universal attributes are passed to the child components. | Name| Type| Default Value| Mandatory| Description| | -------- | -------- | -------- | -------- | -------- | | id | string | - | No| Unique ID of the component.| | width | <length>\|<percentage> | - | No| Component width.| | height | <length>\|<percentage> | - | No| Component height.| | x | <length>\|<percentage> | - | No| X-coordinate of the current **\** component. The settings do not work for the root **\** node. | | y | <length>\|<percentage> | | No| Y-coordinate of the current **\** component. The settings do not work for the root **\** node. | | viewBox | string | - | No| View box of the current **\** component. The supported format is \. The four parameters indicate **min-x**, **min-y**, **width**, and **height**, respectively. The width and height of the view box are different from those of the **\** component. The view box is scaled in center-aligned mode. | ## Example ```html
``` ![en-us_image_0000001173164789](figures/en-us_image_0000001173164789.png)