You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@candlefinance/haptics

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@candlefinance/haptics

Haptic feedback generator with support for playing patterns.

Source
npmnpm
Version
0.2.2
Version published
Weekly downloads
242
16.35%
Maintainers
3
Weekly downloads
 
Created
Source

npm downloads discord users online

Haptics for React Native


The package only supports the iOS using Haptica under the hood.

Installation

yarn add @candlefinance/haptics
npm i @candlefinance/haptics

Basic Usage

There are two functions:

import { haptic, hapticWithPattern } from '@candlefinance/haptics';

// light, medium, heavy, soft, rigid, warning, error, success, selectionChanged.
haptic('medium');

// pattern, delay
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

Contributing

Join our Discord and ask questions in the #oss channel.

License

MIT

Keywords

react-native

FAQs

Package last updated on 28 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts