Skip to main content
.strikethrough(isActive?: boolean): Component
isActive
boolean
default:"true"
Whether the strikethrough is visible. Defaults to true. Pass false to remove.

Support

Usage

Basic strikethrough

Text("Completed task")
    .strikethrough()

Conditional strikethrough

const body = () => {
    const [done, setDone] = useState(false)
    return Text("Buy groceries")
        .strikethrough(done)
        .onTapGesture(() => setDone(!done))
}

Sale price display

VStack({ alignment: "leading" }, [
    Text("$49.99")
        .strikethrough()
        .foregroundStyle(Color("gray")),
    Text("$29.99")
        .foregroundStyle(Color("red"))
        .bold(),
])

See Also