Interactive previews iPhone

RenameButton

A button that triggers a standard rename action

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

Platform Compatibility

iOS 16.0+ iPadOS 16.0+ macOS 13.0+ watchOS 9.0+ tvOS 16.0+ visionOS 1.0+

Tags

SwiftUI Code

Docs
@State private var text = "foo"

var body: some View {
    HStack {
        Text(text)

        RenameButton()
            .padding(.leading)
            .renameAction {
                text = "bar"
            }
        }
    }

Found an issue or have a suggestion?

Created: June 3, 2025Updated: December 27, 2025

More Button Components

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

Button Sizing

The preferred sizing behavior of buttons in the view hierarchy.

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

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
Custom Value Label Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Custom Value Label Picker

Creates a picker that generates its label from a localized string key and accepts a custom current value label.

Store Cancellation Button - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Store Cancellation Button

A type of button that people use to dismiss the current store presentation. It is displayed by default and only works in a sheet.

LinearCapacityGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

LinearCapacityGaugeStyle

A gauge style that displays a bar that fills from leading to trailing edges as the gauge’s current value increases

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

Gauge Colors

Customizing the colors of different styles with minimal effort

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

Picker Section

A Section inside a Picker

AccessoryCircularCapacityGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

AccessoryCircularCapacityGaugeStyle

A gauge style that displays a closed ring that’s partially filled in to indicate the gauge’s current value

List Background Prominence - macOS - Flat Design - Light Mode - Preview
environment

List Background Prominence

The prominence of the background underneath views associated with this environment.

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