<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ShapeRole",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI9ShapeRoleO"
  },
  "title" : "ShapeRole"
}
-->

# ShapeRole

Ways of styling a shape.

```
enum ShapeRole
```

## Topics

### Getting shape roles

[`case fill`](/documentation/SwiftUI/ShapeRole/fill)

Indicates to the shape’s style that SwiftUI fills the shape.

[`case stroke`](/documentation/SwiftUI/ShapeRole/stroke)

Indicates to the shape’s style that SwiftUI applies a stroke to
the shape’s path.

[`case separator`](/documentation/SwiftUI/ShapeRole/separator)

Indicates to the shape’s style that SwiftUI uses the shape as a
separator.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)