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
Swipe Container - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Swipe Container

Only allows a single active swipe within a container.

Overlay Arrangement Edge - iOS on iPhone Duo - Landscape - Partially Open - Liquid Glass - Light Mode - Preview
modifier

Overlay Arrangement Edge

The horizontal edge a view in an overlay arrangement occupies when the arrangement transitions to a horizontal layout. In this case, the primary view overlays the secondary view at the trailing edge when the screen is partially open in landscape.

Tab Badge - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Tab Badge

Generates a badge for a tab from an integer value.

Swipe Action - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Swipe Action

Adds custom swipe actions to a row in a list or container, notifying you when the actions are revealed or dismissed.

Formatted Labeled Content - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Formatted Labeled Content

Creates a labeled informational view from a formatted value.

Concentric Rectangle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Concentric Rectangle

A concentric rectangle whose corner radii are defined from the same circle center as its parent element. The outermost parent is the device frame.

TabSection - iPadOS - Landscape - Liquid Glass - Light Mode - Preview
initializer

TabSection

A container that you can use to add hierarchy within a tab view.

PasteButton - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
type

PasteButton

A system button that reads items from the pasteboard and delivers it to a closure.