---
title: "strikethrough(_:pattern:color:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/strikethrough(_:pattern:color:)"
---

# strikethrough(_:pattern:color:)

Applies a strikethrough to the text in this view.

## Declaration

```swift
nonisolated func strikethrough(_ isActive: Bool = true, pattern: Text.LineStyle.Pattern = .solid, color: Color? = nil) -> some View

```

## Parameters

- `isActive`: A Boolean value that indicates whether strikethrough is added. The default value is true.
- `pattern`: The pattern of the line. The default value is solid.
- `color`: The color of the strikethrough. If color is nil, the strikethrough uses the default foreground color.

## Return Value

Return Value A view where text has a line through its center.

## See Also

### Controlling text style

- [bold(_:)](swiftui/view/bold(_:).md)
- [italic(_:)](swiftui/view/italic(_:).md)
- [underline(_:pattern:color:)](swiftui/view/underline(_:pattern:color:).md)
- [textCase(_:)](swiftui/view/textcase(_:).md)
- [textCase](swiftui/environmentvalues/textcase.md)
- [monospaced(_:)](swiftui/view/monospaced(_:).md)
- [monospacedDigit()](swiftui/view/monospaceddigit().md)
- [AttributedTextFormattingDefinition](swiftui/attributedtextformattingdefinition.md)
- [AttributedTextValueConstraint](swiftui/attributedtextvalueconstraint.md)
- [AttributedTextFormatting](swiftui/attributedtextformatting.md)
