---
title: capsule
framework: uikit
role: symbol
role_heading: Type Property
path: uikit/uishape-swift.struct/capsule
---

# capsule

Creates a capsule shape, a rounded rectangle with a corner radius equal to half the length of the rectangle’s smallest edge.

## Declaration

```swift
static var capsule: UIShape { get }
```

## See Also

### Creating a hover shape

- [rect](uikit/uishape-swift.struct/rect.md)
- [circle](uikit/uishape-swift.struct/circle.md)
- [rect(cornerRadius:cornerCurve:maskedCorners:)](uikit/uishape-swift.struct/rect(cornerradius:cornercurve:maskedcorners:).md)
- [fixedRect(_:cornerRadius:cornerCurve:maskedCorners:)](uikit/uishape-swift.struct/fixedrect(_:cornerradius:cornercurve:maskedcorners:).md)
- [UICornerCurve](uikit/uicornercurve.md)
