SwiftUI Advent Calendar Open
Interactive previews iPhone

Label Reserved Icon Width

Set the width reserved for icons in labels.

Label Reserved Icon Width - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Platform Compatibility

SwiftUI Code

Docs
VStack {
    Button("Bar", systemImage: "plus") {}
    Button("Foo", systemImage: "arrowshape.left.arrowshape.right") {}
    Button("Bar", systemImage: "plus") {}
        .labelReservedIconWidth(37)
}

Found an issue or have a suggestion?

Created: December 1, 2026Updated: December 3, 2026

More Label Components

View all
Label Icon To Title Spacing - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Label Icon To Title Spacing

Set the spacing between the icon and title in labels.

Label Styles - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Label Styles

Sets the style for labels within this view.

Custom Label - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Custom Label

Creates a label with a custom title and icon.

Image Label - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Image Label

Creates a label with an icon image and a title generated from a localized string.

System Image Label - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

System Image Label

Creates a label with a system icon image and a title generated from a localized string.

Explore Other Components

Browse all
Placeholder Icon Store View - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Placeholder Icon Store View

Creates a view to load a collection of products from the App Store using product identifiers, and merchandise them using an image and a custom placeholder icon.

Text Format - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
initializer

Text Format

Creates a text view that displays the formatted representation of a nonstring type supported by a corresponding format style.

Prioritize Sheet Content Scrolling - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Prioritize Sheet Content Scrolling

Configures the behavior of swipe gestures on a presentation. PresentationContentInteraction.scrolls prioritizes scrolling the content over resizing the sheet.

ToolbarItem Shared Background Visibility - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

ToolbarItem Shared Background Visibility

Controls the visibility of the glass background effect on items in the toolbar. In certain contexts, such as the navigation bar on iOS and the window toolbar on macOS, toolbar items will be given a glass background effect that is shared with other items in the same logical grouping

DatePicker Colors - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

DatePicker Colors

Customizing the colors of the date picker

Vertical Divider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Vertical Divider

A vertical visual element that can be used to separate other content

Product View - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Product View

Creates a view to load and merchandise an individual product from the App Store.

Bottom Accessory - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Bottom Accessory

A modifier to place content above the tabs