Declaration
compose().accessibilityHeading(
level: SwiftUI.AccessibilityHeadingLevel
)nonisolated func accessibilityHeading(
_ level: AccessibilityHeadingLevel
) -> TextParameters
The heading level to associate with this element from the available
AccessibilityHeadingLevellevels.
Discussion
Use this modifier to set the level of this heading in relation to other headings. The system speaks
the level number of levels AccessibilityHeadingLevel.h1 through
AccessibilityHeadingLevel.h6 alongside the text.
The default heading level if you don't use this modifier
is AccessibilityHeadingLevel.unspecified.
See also
More in Text modifiers.
- 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.
- monospacedModifies the font of the text to use the fixed-width variant of the current font, if possible.