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

Support

Usage

Basic underline

Text("Underlined text")
    .underline()

Conditional underline

const body = () => {
    const [active, setActive] = useState(false)
    return Text("Toggle underline")
        .underline(active)
        .onTapGesture(() => setActive(!active))
}
Text("Learn more")
    .underline()
    .foregroundStyle(Color("blue"))

See Also