Whether the strikethrough is visible. Defaults to
true. Pass false to remove.Adds a strikethrough line to text.
.strikethrough(isActive?: boolean): Component
true. Pass false to remove.Text("Completed task")
.strikethrough()
const body = () => {
const [done, setDone] = useState(false)
return Text("Buy groceries")
.strikethrough(done)
.onTapGesture(() => setDone(!done))
}
VStack({ alignment: "leading" }, [
Text("$49.99")
.strikethrough()
.foregroundStyle(Color("gray")),
Text("$29.99")
.foregroundStyle(Color("red"))
.bold(),
])