SensoryFeedbackWeight
The weight to be represented by a type of feedback.
Declaration
type SensoryFeedbackWeight = 'heavy' | 'light' | 'medium';struct WeightPass a literal, or build one with SwiftUI.SensoryFeedbackWeight from import { SwiftUI } from 'swiftui-react-native'.
Type properties
'heavy'SwiftUI.SensoryFeedbackWeight.heavyIndicates a collision between large or heavyweight UI objects.
'light'SwiftUI.SensoryFeedbackWeight.lightIndicates a collision between small or lightweight UI objects.
'medium'SwiftUI.SensoryFeedbackWeight.mediumIndicates a collision between medium-sized or medium-weight UI objects.
Overview
Weight values can be passed to
SensoryFeedback.impact(weight:intensity:).
From Apple’s SwiftUI documentation. Code samples there are Swift.
See also
More in Input and interaction.
- ButtonRepeatBehaviorThe options for controlling the repeatability of button actions.
- KeyboardShortcutKeyboard shortcuts describe combinations of keys on a keyboard that the user can press in order to activate a button or toggle.
- KeyboardShortcutLocalizationOptions for how a keyboard shortcut participates in automatic localization.
- PencilPreferredActionAn action that the user prefers to perform after double-tapping their Apple Pencil.
- SensoryFeedbackRepresents a type of haptic and/or audio feedback that can be played.
- SensoryFeedbackFlexibilityThe flexibility to be represented by a type of feedback.
- SensoryFeedbackPressFeedbackFeedback that can be played in response to a press (touch down) on a control.
- SensoryFeedbackReleaseFeedbackFeedback that can be played in response to a release (touch up) of a control.