Skip to content

software-mansion/pulsar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

645 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pulsar - Rich and ready-to use haptics library

A haptic feedback SDK for iOS, Android, and React Native. Pulsar provides ready-to-use haptic presets, a pattern composer for custom haptic sequences, and a real-time composer for gesture-driven feedback.

Features

  • Presets - Library of built-in haptic patterns (hammer, dogBark, buzz, pulse) and system feedback styles (impacts, notifications, selection)
  • Pattern Composer - Define custom haptic patterns using discrete events and continuous amplitude/frequency envelopes
  • Realtime Composer - Live amplitude and frequency control for gesture-driven haptics
  • Cross-platform - Consistent API across iOS (Swift), Android (Kotlin), and React Native (TypeScript)
  • Worklet-compatible - All React Native preset functions and hook methods work inside Reanimated worklets

Quick start

React Native

npx expo install react-native-pulsar
import { Presets, usePatternComposer, useRealtimeComposer } from 'react-native-pulsar';

// Play a preset
Presets.dogBark();

// Play a system haptic
Presets.System.impactMedium();

iOS

Latest available version: 1.0.0

Add Pulsar as a Swift Package dependency in Xcode, or add it to your Package.swift:

dependencies: [
  .package(url: "https://github.com/software-mansion-labs/pulsar-ios", from: "1.0.0")
]
import Pulsar

let pulsar = Pulsar()
pulsar.getPresets().hammer()

Android

Latest available version: 1.1.0

Add Pulsar as a Gradle dependency:

dependencies {
  implementation("com.swmansion:pulsar:1.1.0")
}
import com.swmansion.pulsar.Pulsar

val pulsar = Pulsar(context)
pulsar.getPresets().hammer()

Repository structure

pulsar/
├── iOS/
│   ├── Pulsar/         # iOS Swift SDK (Swift Package, iOS 13+)
│   └── PulsarApp/      # iOS native demo app
├── Android/
│   ├── Pulsar/         # Android Kotlin SDK (Gradle library, API 24+)
│   └── PulsarApp/      # Android native demo app
├── react-native/
│   └── react-native-pulsar/  # React Native Turbo Module
│   └── PulsarApp/            # React Native native demo app
├── PulsarApp/          # React Native Expo showcase app
└── docs/               # Documentation site (Astro/Starlight)

Packages

Platform Package
React Native npm
iOS Swift Package
Android Maven Central

Documentation

Full API reference and guides are available at the documentation site.

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

Pulsar library is licensed under The MIT License.

Try the Pulsar App

Download the Pulsar companion app to feel haptic presets directly on your device:

Community Discord

Join the Software Mansion Community Discord to chat about haptics or other Software Mansion libraries.

Pulsar is created by Software Mansion

Since 2012 Software Mansion is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues. We can help you build your next dream product – Hire us.

About

✨ Pulsar: Rich and ready-to-use haptics library

Resources

License

Contributing

Stars

Watchers

Forks

Contributors