1e41f4b71Sopenharmony_ci# polygon
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci>  **NOTE**
5e41f4b71Sopenharmony_ci>
6e41f4b71Sopenharmony_ci>  This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ciThe **\<polygon>** component is used to draw a polygon.
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci## Required Permissions
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ciNone
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci## Child Components
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ciThe following are supported: [\<animate>](js-components-svg-animate.md), [\<animateMotion>](js-components-svg-animatemotion.md), and [\<animateTransform>](js-components-svg-animatetransform.md).
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci## Attributes
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ciThe [universal attributes](js-components-svg-common-attributes.md) and the attributes listed below are supported.
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci| Name| Type| Default Value| Mandatory| Description|
26e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
27e41f4b71Sopenharmony_ci| id | string | - | No| Unique ID of the component.|
28e41f4b71Sopenharmony_ci| points | string | - | No| Multiple coordinates of the polygon.<br>The format is [x1,y1 x2,y2 x3,y3].<br>Attribute animations are supported. If the number of coordinates of the animation change value set in the attribute animation is different from the format of the original points, the attribute animation is invalid.|
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci## Example
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci```html
34e41f4b71Sopenharmony_ci<!-- xxx.hml -->
35e41f4b71Sopenharmony_ci<div class="container">
36e41f4b71Sopenharmony_ci  <svg fill="white" stroke="blue" width="400" height="400">
37e41f4b71Sopenharmony_ci    <polygon points="10,110 60,35 60,85 110,10" fill="red"></polygon>
38e41f4b71Sopenharmony_ci    <polygon points="10,200 60,125 60,175 110,100" stroke-dasharray="10 5" stroke-dashoffset="3"></polygon>
39e41f4b71Sopenharmony_ci  </svg>
40e41f4b71Sopenharmony_ci</div>
41e41f4b71Sopenharmony_ci```
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ci
44e41f4b71Sopenharmony_ci![en-us_image_0000001173324721](figures/en-us_image_0000001173324721.png)
45