# line icon

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

- Category: Design
- Use it for: line, line tool, straight line
- Tags: line, segment, stroke, draw, vector, straight, tool, handles
- Component name: LineIcon
- Added: 2026-10-15

## 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/line.svg · PNG https://gentleface.com/png/line-round/16/line.png · https://gentleface.com/png/line-round/32/line.png · https://gentleface.com/png/line-round/48/line.png
- line-soft: https://gentleface.com/svg/line-soft/16/line.svg · PNG https://gentleface.com/png/line-soft/16/line.png · https://gentleface.com/png/line-soft/32/line.png · https://gentleface.com/png/line-soft/48/line.png
- line-sharp: https://gentleface.com/svg/line-sharp/16/line.svg · PNG https://gentleface.com/png/line-sharp/16/line.png · https://gentleface.com/png/line-sharp/32/line.png · https://gentleface.com/png/line-sharp/48/line.png
- solid-round: https://gentleface.com/svg/solid-round/16/line.svg · PNG https://gentleface.com/png/solid-round/16/line.png · https://gentleface.com/png/solid-round/32/line.png · https://gentleface.com/png/solid-round/48/line.png
- solid-soft: https://gentleface.com/svg/solid-soft/16/line.svg · PNG https://gentleface.com/png/solid-soft/16/line.png · https://gentleface.com/png/solid-soft/32/line.png · https://gentleface.com/png/solid-soft/48/line.png
- solid-sharp: https://gentleface.com/svg/solid-sharp/16/line.svg · PNG https://gentleface.com/png/solid-sharp/16/line.png · https://gentleface.com/png/solid-sharp/32/line.png · https://gentleface.com/png/solid-sharp/48/line.png

The SVG of every style: https://gentleface.com/icons/line.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="M11.707 5L5 11.707L5 14L2 14L2 11L4.293 11L11 4.293L11 2L14 2L14 5L11.707 5Z"/></svg>
```

### React

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

export function LineIcon(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="M11.707 5L5 11.707L5 14L2 14L2 11L4.293 11L11 4.293L11 2L14 2L14 5L11.707 5Z" />
    </svg>
  );
}
```

### Vue

```vue
<!-- Gentleface "line" (line-round), MIT. https://gentleface.com/icons/line -->
<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="M11.707 5L5 11.707L5 14L2 14L2 11L4.293 11L11 4.293L11 2L14 2L14 5L11.707 5Z" />
  </svg>
</template>
```

### Svelte

```svelte
<!-- Gentleface "line" (line-round), MIT. https://gentleface.com/icons/line -->
<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="M11.707 5L5 11.707L5 14L2 14L2 11L4.293 11L11 4.293L11 2L14 2L14 5L11.707 5Z" />
</svg>
```

### HTML img

```html
<!-- Gentleface "line" (line-round), MIT. https://gentleface.com/icons/line. 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/line.svg" width="16" height="16" alt="">
```

### CSS

```css
/* Gentleface "line" (line-round), MIT. https://gentleface.com/icons/line. Takes the text color. */
.icon-line {
  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='M11.707 5L5 11.707L5 14L2 14L2 11L4.293 11L11 4.293L11 2L14 2L14 5L11.707 5Z'/%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='M11.707 5L5 11.707L5 14L2 14L2 11L4.293 11L11 4.293L11 2L14 2L14 5L11.707 5Z'/%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='M11.707 5L5 11.707L5 14L2 14L2 11L4.293 11L11 4.293L11 2L14 2L14 5L11.707 5Z'/%3E%3C/svg%3E
```

### Sprite

```html
<!-- Gentleface "line" (line-round), MIT. https://gentleface.com/icons/line
     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#line"/></svg>
```

### SwiftUI

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

struct LineIcon: Shape {
    func path(in rect: CGRect) -> Path {
        var p = Path()
        p.move(to: CGPoint(x: 11.707, y: 5))
        p.addLine(to: CGPoint(x: 5, y: 11.707))
        p.addLine(to: CGPoint(x: 5, y: 14))
        p.addLine(to: CGPoint(x: 2, y: 14))
        p.addLine(to: CGPoint(x: 2, y: 11))
        p.addLine(to: CGPoint(x: 4.293, y: 11))
        p.addLine(to: CGPoint(x: 11, y: 4.293))
        p.addLine(to: CGPoint(x: 11, y: 2))
        p.addLine(to: CGPoint(x: 14, y: 2))
        p.addLine(to: CGPoint(x: 14, y: 5))
        p.addLine(to: CGPoint(x: 11.707, y: 5))
        p.closeSubpath()
        return p.applying(CGAffineTransform(scaleX: rect.width / 16, y: rect.height / 16))
    }
}

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

### Compose

```kotlin
// Gentleface "line" (line-round), MIT. https://gentleface.com/icons/line
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 LineIcon: ImageVector by lazy {
    ImageVector.Builder(
        name = "line", defaultWidth = 16.dp, defaultHeight = 16.dp,
        viewportWidth = 16f, viewportHeight = 16f,
    ).addPath(
        pathData = addPathNodes("M11.707 5L5 11.707L5 14L2 14L2 11L4.293 11L11 4.293L11 2L14 2L14 5L11.707 5Z"),
        fill = SolidColor(Color.Black),
    ).build()
}

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

### Android XML

```xml
<!-- res/drawable/ic_line.xml · Gentleface "line" (line-round), MIT. https://gentleface.com/icons/line -->
<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="M11.707 5L5 11.707L5 14L2 14L2 11L4.293 11L11 4.293L11 2L14 2L14 5L11.707 5Z"/>
</vector>
```

### Flutter

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

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

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

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

  @override
  void paint(Canvas canvas, Size size) {
    canvas.scale(size.width / 16, size.height / 16);
    final p = Path()
      ..moveTo(11.707, 5)
      ..lineTo(5, 11.707)
      ..lineTo(5, 14)
      ..lineTo(2, 14)
      ..lineTo(2, 11)
      ..lineTo(4.293, 11)
      ..lineTo(11, 4.293)
      ..lineTo(11, 2)
      ..lineTo(14, 2)
      ..lineTo(14, 5)
      ..lineTo(11.707, 5)
      ..close();
    canvas.drawPath(p, Paint()..color = color);
  }

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