LynxHaptics
Taps the phone, as a native control does when something under the finger changes. Lynx has no navigator.vibrate(). import { LynxHaptics, type HapticImpactStyle, type HapticNotificationType } from '@blotch/angular-lynx';
The Slider, Switch and Context Menu components give their feedback already, as do the segmented controls of Tabs and Toggle.
Usage
Payments stands for the app's own service that takes the payment.
Give feedback for a change the person made, as it happens: a value passing a detent, a selection moving, an action going through. Apple and Google both ask apps to use it sparingly, so it keeps its meaning.
API
LynxHaptics
The methods never throw or reject: feedback a host can't give is left out. iOS and Android play nothing when the person has turned the system's haptics or touch feedback off. Only the apps --platform builds, with ng build or ng serve, have the native module behind it, AngularLynxHaptics.
impact()
Something hit something else, such as a view snapping into place or a control reaching its end. style says how hard, 'medium' unless it's given. Android has three weights of tap, so 'soft' plays as 'light' there and 'rigid' as 'medium'.
selection()
A selection moved, such as a picker's value or a segmented control's segment, or a value passed a detent. The lightest feedback, and the one to give again and again as something moves.
notification()
A task's outcome: it went through, it needs the person's attention, or it failed. 'success' unless it's given.
In tests
Under the testing library the methods do nothing. To check that a component gave feedback, provide a stand-in:
Related
LynxNativeModule, for the host app's own native code
