---
title: Shapes
framework: swiftui
role: collectionGroup
role_heading: API Collection
path: swiftui/shapes
---

# Shapes

Trace and fill built-in and custom shapes with a color, gradient, or other pattern.

## Overview

Overview Draw shapes like circles and rectangles, as well as custom paths that define shapes of your own design. Apply styles that include environment-aware colors, rich gradients, and material effects to the foreground, background, and outline of your shapes.

If you need the efficiency or flexibility of immediate mode drawing — for example, to create particle effects — use a Canvas view instead.

## Topics

### Creating rectangular shapes

- [Rectangle](swiftui/rectangle.md)
- [RoundedRectangle](swiftui/roundedrectangle.md)
- [RoundedCornerStyle](swiftui/roundedcornerstyle.md)
- [RoundedRectangularShape](swiftui/roundedrectangularshape.md)
- [RoundedRectangularShapeCorners](swiftui/roundedrectangularshapecorners.md)
- [UnevenRoundedRectangle](swiftui/unevenroundedrectangle.md)
- [RectangleCornerRadii](swiftui/rectanglecornerradii.md)
- [RectangleCornerInsets](swiftui/rectanglecornerinsets.md)
- [ConcentricRectangle](swiftui/concentricrectangle.md)

### Creating circular shapes

- [Circle](swiftui/circle.md)
- [Ellipse](swiftui/ellipse.md)
- [Capsule](swiftui/capsule.md)

### Drawing custom shapes

- [Path](swiftui/path.md)

### Defining shape behavior

- [ShapeView](swiftui/shapeview.md)
- [Shape](swiftui/shape.md)
- [AnyShape](swiftui/anyshape.md)
- [ShapeRole](swiftui/shaperole.md)
- [StrokeStyle](swiftui/strokestyle.md)
- [StrokeShapeView](swiftui/strokeshapeview.md)
- [StrokeBorderShapeView](swiftui/strokebordershapeview.md)
- [FillStyle](swiftui/fillstyle.md)
- [FillShapeView](swiftui/fillshapeview.md)

### Transforming a shape

- [ScaledShape](swiftui/scaledshape.md)
- [RotatedShape](swiftui/rotatedshape.md)
- [OffsetShape](swiftui/offsetshape.md)
- [TransformedShape](swiftui/transformedshape.md)

### Setting a container shape

- [containerShape(_:)](swiftui/view/containershape(_:).md)
- [InsettableShape](swiftui/insettableshape.md)
- [ContainerRelativeShape](swiftui/containerrelativeshape.md)

## See Also

### Views

- [View fundamentals](swiftui/view-fundamentals.md)
- [View configuration](swiftui/view-configuration.md)
- [View styles](swiftui/view-styles.md)
- [Animations](swiftui/animations.md)
- [Text input and output](swiftui/text-input-and-output.md)
- [Images](swiftui/images.md)
- [Controls and indicators](swiftui/controls-and-indicators.md)
- [Menus and commands](swiftui/menus-and-commands.md)
- [Drawing and graphics](swiftui/drawing-and-graphics.md)
