sectionIndexLabel
Sets the label that is used in a section index to point to this section, typically only a single character long.
View ModifieriOS 26.0+macOS 26.0+tvOS 26.0+watchOS 26.0+visionOS 26.0+sectionIndexLabel(_:) in SwiftUI
Declaration
compose().sectionIndexLabel(label: string | null)@export(implementation) nonisolated func sectionIndexLabel(
_ label: Text?
) -> some View1 more Swift overload share this form
@export(implementation) nonisolated func sectionIndexLabel<S>(
_ label: S?
) -> some View
where S : StringProtocolParameters
label*string | nullThe label to display in the section index, or
nil
Discussion
to display no label for this section.
- See also
listSectionIndexVisibility(_:)
See also
More in Lists and tables.
- deleteDisabledAdds a condition for whether the view's view hierarchy is deletable.
- listItemTintSets the tint effect for content in a list.
- listRowBackgroundPlaces a custom background view behind a list row item.
- listRowInsetsSets the insets of rows in a list on the specified edges.
- listRowSeparatorSets the display mode for the separator associated with this specific row.
- listRowSeparatorTintSets the tint color associated with a row.
- listRowSpacingSets the vertical spacing between two adjacent rows in a List.
- listSectionIndexVisibilityChanges the visibility of the list section index.
- listSectionMarginsSet the section margins for the specific edges.
- listSectionSeparatorSets whether to hide the separator associated with a list section.
- listSectionSeparatorTintSets the tint color associated with a section.
- listSectionSpacingSets the spacing between adjacent sections in a List to a custom value.