# polygon icon

Polygon. Gentleface icon, drawn on the 16 px pixel grid. Free, MIT licensed. Page: https://gentleface.com/icons/polygon

- Category: Shapes
- Use it for: polygon, polygon tool
- Tags: polygon, shape, vector, vertices, nodes, anchor, polygon-tool, geometry
- Component name: PolygonIcon
- Added: 2026-10-16

## Alternatives

- `pen-tool`: draw free vector paths with the pen (pen-tool)

## Files

Each SVG is 16 × 16 with fill="currentColor". Keep it at 16 px or an exact multiple (32, 48) on whole pixels: a fractional size or position blurs it.

- line-round: https://gentleface.com/svg/line-round/16/polygon.svg · PNG https://gentleface.com/png/line-round/16/polygon.png · https://gentleface.com/png/line-round/32/polygon.png · https://gentleface.com/png/line-round/48/polygon.png
- line-soft: https://gentleface.com/svg/line-soft/16/polygon.svg · PNG https://gentleface.com/png/line-soft/16/polygon.png · https://gentleface.com/png/line-soft/32/polygon.png · https://gentleface.com/png/line-soft/48/polygon.png
- line-sharp: https://gentleface.com/svg/line-sharp/16/polygon.svg · PNG https://gentleface.com/png/line-sharp/16/polygon.png · https://gentleface.com/png/line-sharp/32/polygon.png · https://gentleface.com/png/line-sharp/48/polygon.png
- solid-round: https://gentleface.com/svg/solid-round/16/polygon.svg · PNG https://gentleface.com/png/solid-round/16/polygon.png · https://gentleface.com/png/solid-round/32/polygon.png · https://gentleface.com/png/solid-round/48/polygon.png
- solid-soft: https://gentleface.com/svg/solid-soft/16/polygon.svg · PNG https://gentleface.com/png/solid-soft/16/polygon.png · https://gentleface.com/png/solid-soft/32/polygon.png · https://gentleface.com/png/solid-soft/48/polygon.png
- solid-sharp: https://gentleface.com/svg/solid-sharp/16/polygon.svg · PNG https://gentleface.com/png/solid-sharp/16/polygon.png · https://gentleface.com/png/solid-sharp/32/polygon.png · https://gentleface.com/png/solid-sharp/48/polygon.png

The SVG of every style: https://gentleface.com/icons/polygon.json (`svg`).

## Code (line-round)

The snippets are decorative (aria-hidden). For an icon that carries meaning on its own, such as an icon-only button, label the button, or give the SVG role="img" and an aria-label. For another style, take its SVG from the JSON and swap the path `d`.

### SVG

```svg
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M15 6L15 9L13.309 9L11.809 12L12 12L12 15L9 15L9 12.707L3.293 7L1 7L1 4L1.499 4L1.5 4L4 4L4 4.191L7 2.691L7 1L10 1L10 3.293L12.707 6L15 6ZM9.293 4L7 4L7 3.809L4 5.309L4 6.293L9.707 12L10.691 12L12.191 9L12 9L12 6.707L9.293 4Z"/></svg>
```

### React

```tsx
// Gentleface "polygon" (line-round), MIT. https://gentleface.com/icons/polygon
import type { SVGProps } from 'react';

export function PolygonIcon(props: SVGProps<SVGSVGElement>) {
  return (
    <svg xmlns="http://www.w3.org/2000/svg" width={16} height={16} viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
      <path d="M15 6L15 9L13.309 9L11.809 12L12 12L12 15L9 15L9 12.707L3.293 7L1 7L1 4L1.499 4L1.5 4L4 4L4 4.191L7 2.691L7 1L10 1L10 3.293L12.707 6L15 6ZM9.293 4L7 4L7 3.809L4 5.309L4 6.293L9.707 12L10.691 12L12.191 9L12 9L12 6.707L9.293 4Z" />
    </svg>
  );
}
```

### Vue

```vue
<!-- Gentleface "polygon" (line-round), MIT. https://gentleface.com/icons/polygon -->
<template>
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
    <path d="M15 6L15 9L13.309 9L11.809 12L12 12L12 15L9 15L9 12.707L3.293 7L1 7L1 4L1.499 4L1.5 4L4 4L4 4.191L7 2.691L7 1L10 1L10 3.293L12.707 6L15 6ZM9.293 4L7 4L7 3.809L4 5.309L4 6.293L9.707 12L10.691 12L12.191 9L12 9L12 6.707L9.293 4Z" />
  </svg>
</template>
```

### Svelte

```svelte
<!-- Gentleface "polygon" (line-round), MIT. https://gentleface.com/icons/polygon -->
<script>
  let props = $props();
</script>

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
  <path d="M15 6L15 9L13.309 9L11.809 12L12 12L12 15L9 15L9 12.707L3.293 7L1 7L1 4L1.499 4L1.5 4L4 4L4 4.191L7 2.691L7 1L10 1L10 3.293L12.707 6L15 6ZM9.293 4L7 4L7 3.809L4 5.309L4 6.293L9.707 12L10.691 12L12.191 9L12 9L12 6.707L9.293 4Z" />
</svg>
```

### HTML img

```html
<!-- Gentleface "polygon" (line-round), MIT. https://gentleface.com/icons/polygon. An <img> can't take currentColor: it draws black. Inline the SVG or use the CSS mask to color it. -->
<img src="https://gentleface.com/svg/line-round/16/polygon.svg" width="16" height="16" alt="">
```

### CSS

```css
/* Gentleface "polygon" (line-round), MIT. https://gentleface.com/icons/polygon. Takes the text color. */
.icon-polygon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M15 6L15 9L13.309 9L11.809 12L12 12L12 15L9 15L9 12.707L3.293 7L1 7L1 4L1.499 4L1.5 4L4 4L4 4.191L7 2.691L7 1L10 1L10 3.293L12.707 6L15 6ZM9.293 4L7 4L7 3.809L4 5.309L4 6.293L9.707 12L10.691 12L12.191 9L12 9L12 6.707L9.293 4Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M15 6L15 9L13.309 9L11.809 12L12 12L12 15L9 15L9 12.707L3.293 7L1 7L1 4L1.499 4L1.5 4L4 4L4 4.191L7 2.691L7 1L10 1L10 3.293L12.707 6L15 6ZM9.293 4L7 4L7 3.809L4 5.309L4 6.293L9.707 12L10.691 12L12.191 9L12 9L12 6.707L9.293 4Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
```

### Data URL

```text
data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath d='M15 6L15 9L13.309 9L11.809 12L12 12L12 15L9 15L9 12.707L3.293 7L1 7L1 4L1.499 4L1.5 4L4 4L4 4.191L7 2.691L7 1L10 1L10 3.293L12.707 6L15 6ZM9.293 4L7 4L7 3.809L4 5.309L4 6.293L9.707 12L10.691 12L12.191 9L12 9L12 6.707L9.293 4Z'/%3E%3C/svg%3E
```

### Sprite

```html
<!-- Gentleface "polygon" (line-round), MIT. https://gentleface.com/icons/polygon
     Every icon of this style in one file: https://gentleface.com/sprite/line-round.svg
     Serve it from your own origin: <use> does not load from another origin. -->
<svg width="16" height="16" aria-hidden="true"><use href="/sprite/line-round.svg#polygon"/></svg>
```

### SwiftUI

```swift
// Gentleface "polygon" (line-round), MIT. https://gentleface.com/icons/polygon
import SwiftUI

struct PolygonIcon: Shape {
    func path(in rect: CGRect) -> Path {
        var p = Path()
        p.move(to: CGPoint(x: 15, y: 6))
        p.addLine(to: CGPoint(x: 15, y: 9))
        p.addLine(to: CGPoint(x: 13.309, y: 9))
        p.addLine(to: CGPoint(x: 11.809, y: 12))
        p.addLine(to: CGPoint(x: 12, y: 12))
        p.addLine(to: CGPoint(x: 12, y: 15))
        p.addLine(to: CGPoint(x: 9, y: 15))
        p.addLine(to: CGPoint(x: 9, y: 12.707))
        p.addLine(to: CGPoint(x: 3.293, y: 7))
        p.addLine(to: CGPoint(x: 1, y: 7))
        p.addLine(to: CGPoint(x: 1, y: 4))
        p.addLine(to: CGPoint(x: 1.499, y: 4))
        p.addLine(to: CGPoint(x: 1.5, y: 4))
        p.addLine(to: CGPoint(x: 4, y: 4))
        p.addLine(to: CGPoint(x: 4, y: 4.191))
        p.addLine(to: CGPoint(x: 7, y: 2.691))
        p.addLine(to: CGPoint(x: 7, y: 1))
        p.addLine(to: CGPoint(x: 10, y: 1))
        p.addLine(to: CGPoint(x: 10, y: 3.293))
        p.addLine(to: CGPoint(x: 12.707, y: 6))
        p.addLine(to: CGPoint(x: 15, y: 6))
        p.closeSubpath()
        p.move(to: CGPoint(x: 9.293, y: 4))
        p.addLine(to: CGPoint(x: 7, y: 4))
        p.addLine(to: CGPoint(x: 7, y: 3.809))
        p.addLine(to: CGPoint(x: 4, y: 5.309))
        p.addLine(to: CGPoint(x: 4, y: 6.293))
        p.addLine(to: CGPoint(x: 9.707, y: 12))
        p.addLine(to: CGPoint(x: 10.691, y: 12))
        p.addLine(to: CGPoint(x: 12.191, y: 9))
        p.addLine(to: CGPoint(x: 12, y: 9))
        p.addLine(to: CGPoint(x: 12, y: 6.707))
        p.addLine(to: CGPoint(x: 9.293, y: 4))
        p.closeSubpath()
        return p.applying(CGAffineTransform(scaleX: rect.width / 16, y: rect.height / 16))
    }
}

// PolygonIcon().frame(width: 16, height: 16) fills with the foreground style. Keep it on whole points to stay crisp.
```

### Compose

```kotlin
// Gentleface "polygon" (line-round), MIT. https://gentleface.com/icons/polygon
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.addPathNodes
import androidx.compose.ui.unit.dp

val PolygonIcon: ImageVector by lazy {
    ImageVector.Builder(
        name = "polygon", defaultWidth = 16.dp, defaultHeight = 16.dp,
        viewportWidth = 16f, viewportHeight = 16f,
    ).addPath(
        pathData = addPathNodes("M15 6L15 9L13.309 9L11.809 12L12 12L12 15L9 15L9 12.707L3.293 7L1 7L1 4L1.499 4L1.5 4L4 4L4 4.191L7 2.691L7 1L10 1L10 3.293L12.707 6L15 6ZM9.293 4L7 4L7 3.809L4 5.309L4 6.293L9.707 12L10.691 12L12.191 9L12 9L12 6.707L9.293 4Z"),
        fill = SolidColor(Color.Black),
    ).build()
}

// Icon(PolygonIcon, contentDescription = null) tints it with LocalContentColor.
```

### Android XML

```xml
<!-- res/drawable/ic_polygon.xml · Gentleface "polygon" (line-round), MIT. https://gentleface.com/icons/polygon -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="16dp"
    android:height="16dp"
    android:viewportWidth="16"
    android:viewportHeight="16"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M15 6L15 9L13.309 9L11.809 12L12 12L12 15L9 15L9 12.707L3.293 7L1 7L1 4L1.499 4L1.5 4L4 4L4 4.191L7 2.691L7 1L10 1L10 3.293L12.707 6L15 6ZM9.293 4L7 4L7 3.809L4 5.309L4 6.293L9.707 12L10.691 12L12.191 9L12 9L12 6.707L9.293 4Z"/>
</vector>
```

### Flutter

```dart
// Gentleface "polygon" (line-round), MIT. https://gentleface.com/icons/polygon
import 'package:flutter/widgets.dart';

class PolygonIcon extends StatelessWidget {
  const PolygonIcon({super.key, this.size = 16, this.color});
  final double size;
  final Color? color;

  @override
  Widget build(BuildContext context) => CustomPaint(
        size: Size.square(size),
        painter: _PolygonIconPainter(color ?? IconTheme.of(context).color ?? const Color(0xFF000000)),
      );
}

class _PolygonIconPainter extends CustomPainter {
  _PolygonIconPainter(this.color);
  final Color color;

  @override
  void paint(Canvas canvas, Size size) {
    canvas.scale(size.width / 16, size.height / 16);
    final p = Path()
      ..moveTo(15, 6)
      ..lineTo(15, 9)
      ..lineTo(13.309, 9)
      ..lineTo(11.809, 12)
      ..lineTo(12, 12)
      ..lineTo(12, 15)
      ..lineTo(9, 15)
      ..lineTo(9, 12.707)
      ..lineTo(3.293, 7)
      ..lineTo(1, 7)
      ..lineTo(1, 4)
      ..lineTo(1.499, 4)
      ..lineTo(1.5, 4)
      ..lineTo(4, 4)
      ..lineTo(4, 4.191)
      ..lineTo(7, 2.691)
      ..lineTo(7, 1)
      ..lineTo(10, 1)
      ..lineTo(10, 3.293)
      ..lineTo(12.707, 6)
      ..lineTo(15, 6)
      ..close()
      ..moveTo(9.293, 4)
      ..lineTo(7, 4)
      ..lineTo(7, 3.809)
      ..lineTo(4, 5.309)
      ..lineTo(4, 6.293)
      ..lineTo(9.707, 12)
      ..lineTo(10.691, 12)
      ..lineTo(12.191, 9)
      ..lineTo(12, 9)
      ..lineTo(12, 6.707)
      ..lineTo(9.293, 4)
      ..close();
    canvas.drawPath(p, Paint()..color = color);
  }

  @override
  bool shouldRepaint(_PolygonIconPainter old) => old.color != color;
}
```
