Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

strikethrough(_:)

A view modifier that maps SwiftUI's strikethrough.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.strikethrough(isActive: Boolean = true, pattern: Text.LineStyle.Pattern = Text.LineStyle.Pattern.solid, color: Color? = null): Modifier

Overview

Modifier.strikethrough()

This is the Kotlin form of SwiftUI View.strikethrough(_:pattern:color:): SwiftUI documentation. In Swift it reads:

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

Topics

Overloads

fun Modifier.strikethrough(isActive: Boolean = true, pattern: Text.LineStyle.Pattern = Text.LineStyle.Pattern.solid, color: Color? = null): Modifier
SwiftUI View.strikethrough(_:pattern:color:)