One Logo Pool Ball
SwiftUI · IOS API REFERENCE

SensoryFeedback

struct · iOS 17.0+ · SDK 27.1

struct SensoryFeedback

Represents a type of haptic and/or audio feedback that can be played. This feedback can be passed to `View.sensoryFeedback` to play it.

Members (17)

get · iOS 17.0+

levelChange

TypeScript
static get levelChange(): SensoryFeedback
Swift declaration
static let levelChange: SensoryFeedback

Indicates movement between discrete levels of pressure. For example, as the user presses a fast-forward button on a video player, playback could increase or decrease and haptic feedback could be provided as different levels of pressure are reached. Only plays feedback on macOS.

get · iOS 17.5+

pathComplete

TypeScript
static get pathComplete(): SensoryFeedback
Swift declaration
static let pathComplete: SensoryFeedback

Indicates a drawn path has completed and/or recognized. Use this to provide feedback for closed shape drawing or similar actions. It should supplement the user experience, since only some platforms will play feedback in response to it. Only plays feedback on iOS.

get · iOS 17.0+

stop

TypeScript
static get stop(): SensoryFeedback
Swift declaration
static let stop: SensoryFeedback

Indicates that an activity stopped. Use this haptic when stopping a timer or other activity that was previously started. Only plays feedback on watchOS.

get · iOS 17.0+

error

TypeScript
static get error(): SensoryFeedback
Swift declaration
static let error: SensoryFeedback

Indicates that an error has occurred. Only plays feedback on iOS and watchOS.

static · iOS 26.0+

press

TypeScript
static press(feedback: SensoryFeedback_PressFeedback): SensoryFeedback
Swift declaration
static func press(_ feedback: SensoryFeedback.PressFeedback) -> SensoryFeedback

Plays feedback in response to a specific UI element being pressed (touch down).

get · iOS 17.0+

start

TypeScript
static get start(): SensoryFeedback
Swift declaration
static let start: SensoryFeedback

Indicates that an activity started. Use this haptic when starting a timer or any other activity that can be explicitly started and stopped. Only plays feedback on watchOS.

static · iOS 17.0+

impact

TypeScript
static impactFlexibilityIntensity(flexibility: SensoryFeedback_Flexibility, intensity?: number): SensoryFeedback
Swift declaration
static func impact(flexibility: SensoryFeedback.Flexibility, intensity: Double = 1.0) -> SensoryFeedback

Provides a physical metaphor you can use to complement a visual experience. Use this to provide feedback for UI elements colliding. It should supplement the user experience, since only some platforms will play feedback in response to it. Not all platforms will play different feedback for different flexibilities and intensities of impact. Only plays feedback on iOS and watchOS.

static · iOS 17.0+

impact

TypeScript
static impactWeightIntensity(weight?: SensoryFeedback_Weight, intensity?: number): SensoryFeedback
Swift declaration
static func impact(weight: SensoryFeedback.Weight = .medium, intensity: Double = 1.0) -> SensoryFeedback

Provides a physical metaphor you can use to complement a visual experience. Use this to provide feedback for UI elements colliding. It should supplement the user experience, since only some platforms will play feedback in response to it. Not all platforms will play different feedback for different weights and intensities of impact. Only plays feedback on iOS and watchOS.

get · iOS 17.0+

impact

TypeScript
static get impact(): SensoryFeedback
Swift declaration
static let impact: SensoryFeedback

Provides a physical metaphor you can use to complement a visual experience. Use this to provide feedback for UI elements colliding. It should supplement the user experience, since only some platforms will play feedback in response to it. Only plays feedback on iOS and watchOS.

static · iOS 26.0+

release

TypeScript
static release(feedback: SensoryFeedback_ReleaseFeedback): SensoryFeedback
Swift declaration
static func release(_ feedback: SensoryFeedback.ReleaseFeedback) -> SensoryFeedback

Plays feedback in response to a specific UI element being released (touch up).

get · iOS 17.0+

success

TypeScript
static get success(): SensoryFeedback
Swift declaration
static let success: SensoryFeedback

Indicates that a task or action has completed. Only plays feedback on iOS and watchOS.

get · iOS 17.0+

warning

TypeScript
static get warning(): SensoryFeedback
Swift declaration
static let warning: SensoryFeedback

Indicates that a task or action has produced a warning of some kind. Only plays feedback on iOS and watchOS.

get · iOS 17.0+

decrease

TypeScript
static get decrease(): SensoryFeedback
Swift declaration
static let decrease: SensoryFeedback

Indicates that an important value decreased below a significant threshold. Only plays feedback on watchOS and visionOS.

get · iOS 17.0+

increase

TypeScript
static get increase(): SensoryFeedback
Swift declaration
static let increase: SensoryFeedback

Indicates that an important value increased above a significant threshold. Only plays feedback on watchOS and visionOS.

get · iOS 17.0+

alignment

TypeScript
static get alignment(): SensoryFeedback
Swift declaration
static let alignment: SensoryFeedback

Indicates the alignment of a dragged item. For example, use this pattern in a drawing app when the user drags a shape into alignment with another shape. Only plays feedback on iOS and macOS.

get · iOS 17.0+

selection

TypeScript
static get selection(): SensoryFeedback
Swift declaration
static let selection: SensoryFeedback

Indicates that a UI element’s values are changing. Equivalent to ``selection(_:)`` with ``SelectionFeedback/default``. Only plays feedback on iOS and watchOS.

static · iOS 26.0+

selection

TypeScript
static selection8389(feedback: SensoryFeedback_SelectionFeedback): SensoryFeedback
Swift declaration
static func selection(_ feedback: SensoryFeedback.SelectionFeedback) -> SensoryFeedback

Plays feedback in response to a specific UI element's values changing.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUI types →