> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperwisor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Polygon

> An N-sided polygon shape for decoration.

<Info>
  **Category:** Shapes · **Decorative:** no data binding
</Info>

## Mental model

A **Polygon is an N-sided shape.** Set the **number of sides** for a pentagon,
hexagon, octagon, and so on.

## Settings

Common shape settings — **fill**, **stroke** (color + width), **opacity**, optional
**rotation speed** — plus **number of sides**.

## Script API example

The same interactions from a [dashboard script](/script/overview):

```js theme={null}
// Spin as an activity indicator
let a = 0;
const spin = setInterval(() => widget.setRotation('hex', (a += 5) % 360), 100);
// later: clearInterval(spin);
```

<Card title="Star" icon="star" href="/dashboard/widgets/star">
  A multi-point star instead of a regular polygon.
</Card>
