# line The **\** component is used to draw a line. > **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.| | x1 | <length>\|<percentage> | - | No| X-coordinate of the start point of the line. Attribute animations are supported.| | y1 | <length>\|<percentage> | - | No| Y-coordinate of the start point of the line. Attribute animations are supported.| | x2 | <length>\|<percentage> | - | No| X-coordinate of the end point of the line. Attribute animations are supported.| | y2 | <length>\|<percentage> | - | No| Y-coordinate of the end point of the line. Attribute animations are supported.| ## Example ```html
// round: At the end of each path the stroke is extended by a half circle with a diameter equal to the stroke width. // butt: The stroke for each path does not extend beyond its two endpoints. // square: At the end of each path the stroke is extended by a half circle, with the width being equal to half of the stroke width, and the height being equal to the stroke width.
``` ![en-us_image_0000001127284954](figures/en-us_image_0000001127284954.png)