Interactive previews iPhone Apple Watch

Button Sizing

The preferred sizing behavior of buttons in the view hierarchy.

Button Sizing - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Platform Compatibility

iOS 26.0+ iPadOS 26.0+ macOS 26.0+ watchOS 26.0+ tvOS 26.0+ visionOS 26.0+

Tags

SwiftUI Code

Docs
HStack {
    Button("Tap Me", action: action)
        .buttonStyle(.borderedProminent)
        .buttonSizing(.fitted)
    Button("Tap Me", action: action)
        .buttonStyle(.borderedProminent)
        .buttonSizing(.flexible)
}

Found an issue or have a suggestion?

Created: April 18, 2026Updated: April 18, 2026

More Button Components

View all
Role Button With Default Label - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Role Button With Default Label

Creates a button that displays a default label.

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

Glass Button Styles

A button style that applies glass border artwork based on the button’s context

RenameButton - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
TextField

RenameButton

A button that triggers a standard rename action

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

EditButton

A button that toggles the edit mode environment value

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.

Button Tint - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Button Tint

Sets the buttons tint color

Button Roles - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Button Roles

A value that describes the purpose of a button.

Button Border Shape - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Button Border Shape

A shape used to draw a button’s border.

Explore Other Components

Browse all
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.

Hard ScrollEdgeEffect - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Hard ScrollEdgeEffect

A scroll edge effect with a hard cutoff and dividing line

Nested Menu - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
content

Nested Menu

A Menu inside a Menu

List Row Insets - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

List Row Insets

Applies an inset to the rows in a list.

Stepped Slider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Stepped Slider

Creates a slider to select a value from a given range, subject to a step increment

Section Index Label and Visibility - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Section Index Label and Visibility

Sets the label that is used in a section index to point to this section, typically only a single character long. Changes the visibility of the list section index.

Hidden List Section Separator - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Hidden List Section Separator

Sets whether to hide the separator associated with a list section.

Picker Section - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
content

Picker Section

A Section inside a Picker