Currently the project only supports the iOS using Haptica under the hood.
yarn add @candlefinance/haptics
npm i @candlefinance/haptics
There are two functions:
import { haptic, hapticWithPattern } from '@candlefinance/haptics';
haptic('medium'); // light, medium, heavy, etc.
hapticWithPattern(
['.', '.', '.', 'o', 'O', '-', 'O', 'o', '.', '.', '.', '.'],
0.1
);
The pattern format:
- O - heavy impact
- o - medium impact
- . - light impact
- X - rigid impact
- x - soft impact
-
- wait 0.1 second
Join our Discord and ask questions in the #oss channel.
MIT