# bounding-box icon

Bounding box. Gentleface icon, drawn on the 16 px pixel grid. Free, MIT licensed. Page: https://gentleface.com/icons/bounding-box

- Category: Design
- Use it for: bounding box, free transform
- Tags: bounding-box, transform, free-transform, select, selection, handles, resize, vector, object
- Component name: BoundingBoxIcon
- Added: 2026-10-15

## Alternatives

- `skew`: slant only
- `perspective`: distort with depth (trapezoid)
- `resize`: change the size only

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

The SVG of every style: https://gentleface.com/icons/bounding-box.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="M5 3L11 3L11 2L14 2L14 5L13 5L13 11L14 11L14 14L11 14L11 13L5 13L5 14L2 14L2 11L3 11L3 5L2 5L2 2L5 2L5 3ZM4 11L5 11L5 12L11 12L11 11L12 11L12 5L11 5L11 4L5 4L5 5L4 5L4 11Z"/></svg>
```

### React

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

export function BoundingBoxIcon(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="M5 3L11 3L11 2L14 2L14 5L13 5L13 11L14 11L14 14L11 14L11 13L5 13L5 14L2 14L2 11L3 11L3 5L2 5L2 2L5 2L5 3ZM4 11L5 11L5 12L11 12L11 11L12 11L12 5L11 5L11 4L5 4L5 5L4 5L4 11Z" />
    </svg>
  );
}
```

### Vue

```vue
<!-- Gentleface "bounding-box" (line-round), MIT. https://gentleface.com/icons/bounding-box -->
<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="M5 3L11 3L11 2L14 2L14 5L13 5L13 11L14 11L14 14L11 14L11 13L5 13L5 14L2 14L2 11L3 11L3 5L2 5L2 2L5 2L5 3ZM4 11L5 11L5 12L11 12L11 11L12 11L12 5L11 5L11 4L5 4L5 5L4 5L4 11Z" />
  </svg>
</template>
```

### Svelte

```svelte
<!-- Gentleface "bounding-box" (line-round), MIT. https://gentleface.com/icons/bounding-box -->
<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="M5 3L11 3L11 2L14 2L14 5L13 5L13 11L14 11L14 14L11 14L11 13L5 13L5 14L2 14L2 11L3 11L3 5L2 5L2 2L5 2L5 3ZM4 11L5 11L5 12L11 12L11 11L12 11L12 5L11 5L11 4L5 4L5 5L4 5L4 11Z" />
</svg>
```

### HTML img

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

### CSS

```css
/* Gentleface "bounding-box" (line-round), MIT. https://gentleface.com/icons/bounding-box. Takes the text color. */
.icon-bounding-box {
  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='M5 3L11 3L11 2L14 2L14 5L13 5L13 11L14 11L14 14L11 14L11 13L5 13L5 14L2 14L2 11L3 11L3 5L2 5L2 2L5 2L5 3ZM4 11L5 11L5 12L11 12L11 11L12 11L12 5L11 5L11 4L5 4L5 5L4 5L4 11Z'/%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='M5 3L11 3L11 2L14 2L14 5L13 5L13 11L14 11L14 14L11 14L11 13L5 13L5 14L2 14L2 11L3 11L3 5L2 5L2 2L5 2L5 3ZM4 11L5 11L5 12L11 12L11 11L12 11L12 5L11 5L11 4L5 4L5 5L4 5L4 11Z'/%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='M5 3L11 3L11 2L14 2L14 5L13 5L13 11L14 11L14 14L11 14L11 13L5 13L5 14L2 14L2 11L3 11L3 5L2 5L2 2L5 2L5 3ZM4 11L5 11L5 12L11 12L11 11L12 11L12 5L11 5L11 4L5 4L5 5L4 5L4 11Z'/%3E%3C/svg%3E
```

### Sprite

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

### SwiftUI

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

struct BoundingBoxIcon: Shape {
    func path(in rect: CGRect) -> Path {
        var p = Path()
        p.move(to: CGPoint(x: 5, y: 3))
        p.addLine(to: CGPoint(x: 11, y: 3))
        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: 13, y: 5))
        p.addLine(to: CGPoint(x: 13, y: 11))
        p.addLine(to: CGPoint(x: 14, y: 11))
        p.addLine(to: CGPoint(x: 14, y: 14))
        p.addLine(to: CGPoint(x: 11, y: 14))
        p.addLine(to: CGPoint(x: 11, y: 13))
        p.addLine(to: CGPoint(x: 5, y: 13))
        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: 3, y: 11))
        p.addLine(to: CGPoint(x: 3, y: 5))
        p.addLine(to: CGPoint(x: 2, y: 5))
        p.addLine(to: CGPoint(x: 2, y: 2))
        p.addLine(to: CGPoint(x: 5, y: 2))
        p.addLine(to: CGPoint(x: 5, y: 3))
        p.closeSubpath()
        p.move(to: CGPoint(x: 4, y: 11))
        p.addLine(to: CGPoint(x: 5, y: 11))
        p.addLine(to: CGPoint(x: 5, y: 12))
        p.addLine(to: CGPoint(x: 11, y: 12))
        p.addLine(to: CGPoint(x: 11, y: 11))
        p.addLine(to: CGPoint(x: 12, y: 11))
        p.addLine(to: CGPoint(x: 12, y: 5))
        p.addLine(to: CGPoint(x: 11, y: 5))
        p.addLine(to: CGPoint(x: 11, y: 4))
        p.addLine(to: CGPoint(x: 5, y: 4))
        p.addLine(to: CGPoint(x: 5, y: 5))
        p.addLine(to: CGPoint(x: 4, y: 5))
        p.addLine(to: CGPoint(x: 4, y: 11))
        p.closeSubpath()
        return p.applying(CGAffineTransform(scaleX: rect.width / 16, y: rect.height / 16))
    }
}

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

### Compose

```kotlin
// Gentleface "bounding-box" (line-round), MIT. https://gentleface.com/icons/bounding-box
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 BoundingBoxIcon: ImageVector by lazy {
    ImageVector.Builder(
        name = "bounding-box", defaultWidth = 16.dp, defaultHeight = 16.dp,
        viewportWidth = 16f, viewportHeight = 16f,
    ).addPath(
        pathData = addPathNodes("M5 3L11 3L11 2L14 2L14 5L13 5L13 11L14 11L14 14L11 14L11 13L5 13L5 14L2 14L2 11L3 11L3 5L2 5L2 2L5 2L5 3ZM4 11L5 11L5 12L11 12L11 11L12 11L12 5L11 5L11 4L5 4L5 5L4 5L4 11Z"),
        fill = SolidColor(Color.Black),
    ).build()
}

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

### Android XML

```xml
<!-- res/drawable/ic_bounding_box.xml · Gentleface "bounding-box" (line-round), MIT. https://gentleface.com/icons/bounding-box -->
<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="M5 3L11 3L11 2L14 2L14 5L13 5L13 11L14 11L14 14L11 14L11 13L5 13L5 14L2 14L2 11L3 11L3 5L2 5L2 2L5 2L5 3ZM4 11L5 11L5 12L11 12L11 11L12 11L12 5L11 5L11 4L5 4L5 5L4 5L4 11Z"/>
</vector>
```

### Flutter

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

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

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

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

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

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