<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/StrokeStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11StrokeStyleV"
  },
  "title" : "StrokeStyle"
}
-->

# StrokeStyle

The characteristics of a stroke that traces a path.

```
@frozen struct StrokeStyle
```

## Topics

### Creating a stroke style

[`init(lineWidth:lineCap:lineJoin:miterLimit:dash:dashPhase:)`](/documentation/SwiftUI/StrokeStyle/init(lineWidth:lineCap:lineJoin:miterLimit:dash:dashPhase:))

Creates a new stroke style from the given components.

### Setting stroke style properties

[`lineWidth`](/documentation/SwiftUI/StrokeStyle/lineWidth)

The width of the stroked path.

[`lineCap`](/documentation/SwiftUI/StrokeStyle/lineCap)

The endpoint style of a line.

[`lineJoin`](/documentation/SwiftUI/StrokeStyle/lineJoin)

The join type of a line.

[`miterLimit`](/documentation/SwiftUI/StrokeStyle/miterLimit)

A threshold used to determine whether to use a bevel instead of a
miter at a join.

[`dash`](/documentation/SwiftUI/StrokeStyle/dash)

The lengths of painted and unpainted segments used to make a dashed line.

[`dashPhase`](/documentation/SwiftUI/StrokeStyle/dashPhase)

How far into the dash pattern the line starts.



---

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)