Text ModifieriOS 13.0+macOS 10.15+tvOS 13.0+watchOS 6.0+
Overloads
2 ways to call compose().underline(). Each is one SwiftUI overload, picked by the arguments you pass.
compose().underline(
isActive?: boolean,
options?: {
color?: SwiftUI.Color | null;
}
)nonisolated func underline(
_ isActive: Bool = true,
color: Color? = nil
) -> TextParameters
isActivebooleanA Boolean value that indicates whether the text has an underline.
options.colorSwiftUI.Color | nullThe color of the underline. If
colorisnil, the underline uses the default foreground color.
Return value
Text with a line running along its baseline.
See also
More in Text modifiers.
- accessibilityHeadingSets the accessibility level of this heading.
- accessibilityLabelAdds a label to the view that describes its contents.
- accessibilityTextContentTypeSets an accessibility text content type.
- baselineOffsetSets the vertical offset for the text relative to its baseline.
- boldApplies a bold font weight to the text.
- fontSets the default font for text in the view.
- fontDesignSets the font design of the text.
- fontWeightSets the font weight of the text.
- fontWidthSets the font width of the text.
- foregroundStyleSets the style of the text displayed by this view.
- italicApplies italics to the text.
- kerningSets the spacing, or kerning, between characters.