Interactive previews iPhone

Swipe Action

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

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

Platform Compatibility

iOS 27.0+ iPadOS 27.0+ macOS 27.0+ watchOS 27.0+ visionOS 27.0+

Tags

SwiftUI Code

Docs
@State private var isSwiped = false

var body: some View {
    VStack {
        Text("Trailing Swipe")
            .swipeActions {
                Button(role: .destructive, action: action)
            }
        Text("Leading Swipe")
            .swipeActions(edge: .leading) {
                Button(role: .destructive, action: action)
            }
        Text("Stateful Swipe")
            .swipeActions {
                Button(role: .destructive, action: action)
            } onPresentationChanged: {
                isSwiped = $0
            }
        Text("Swipe state: \(isSwiped ? "active" : "inactive")")
    }
}

Found an issue or have a suggestion?

Created: June 18, 2026Updated: November 20, 2026

More View Components

View all
Scroll Gesture Axis Lock - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Scroll Gesture Axis Lock

Sets whether scrollable views within this view lock each scroll gesture to its predominant axis. On macOS, scroll gestures lock to their predominant axis by default. On iOS, iPadOS, Mac Catalyst, visionOS, and watchOS, scroll gestures move along both axes at once.

VisionOS background materials - visionOS - Liquid Glass - Light Mode - Preview
type

VisionOS background materials

All background materials on visionOS

Container Content Margins - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Container Content Margins

Adds the margins of the container the view is in.

Toolbar Vertical Edge - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
environment

Toolbar Vertical Edge

This value reflects the system’s preferred edge for the vertical bar in the current context, regardless of whether a vertical bar is currently visible. Use it to position custom bars or other UI relative to the system’s bar placement.

Hinge State - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview
structure

Hinge State

A type encapsulating the state of a single hinge.

Disabled Toolbar Vertical Behavior - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview
modifier

Disabled Toolbar Vertical Behavior

Disables the vertical bar.

Music Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Music Picker

Presents a music picker to select items from the Apple Music catalog and the user’s music library.

App Store Overlay - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

App Store Overlay

Presents a StoreKit overlay when a given condition is true.

Explore Other Components

Browse all
Item Sheet - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Item Sheet

Presents a sheet using the given item as a data source for the sheet’s content. On watchOS, sheets are displayed as fullScreenCover.

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

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.

StepperFieldDatePickerStyle - macOS - Flat Design - Light Mode - Preview
style

StepperFieldDatePickerStyle

A system style that displays the components in an editable field, with adjoining stepper that can increment/decrement the selected component

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

List Section Margins - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

List Section Margins

Set the section margins for the specific edges.

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

RenameButton

A button that triggers a standard rename action

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

GraphicalDatePickerStyle

A date picker style that displays an interactive calendar or clock