- July 26, 2025
- Mins Read
Haptica is an easy haptic feedback generator.
$ pod try Haptica
Generate using a haptic feedback type.
Haptic.impact(.light).generate()
Play a custom vibration pattern:
Haptic.play(“..oO-Oo..”, delay: 0.1)
Use pattern symbols to represent custom vibrations.
O
– heavy impacto
– medium impact.
– light impactX
– rigid impactx
– soft impact-
– wait 0.1 secondOr play a symphony of notes:
Haptic.play([.haptic(.impact(.light)), .haptic(.impact(.heavy)), .wait(0.1), .haptic(.impact(.heavy)), .haptic(.impact(.light))])
To enable haptic feedback on buttons, set these properties:
isHaptic
– enables haptic feedbackhapticType
– haptic feedback type
button.isHaptic = true
button.hapticType = .impact(.light)
or use these functions to set the haptic feedback type for control events:
addHaptic()
– add haptic feedback for control eventsremoveHaptic()
– remove haptic feedback for control events
button.addHaptic(.selection, forControlEvents: .touchDown)
button.removeHaptic(forControlEvents: .touchDown)
var isHaptic: Bool // enables haptic feedback
var hapticType: Haptic? // haptic feedback type
var hapticControlEvents: UIControl.Event? // haptic feedback control events
func addHaptic(_ haptic: Haptic, forControlEvents events: UIControl.Event) {} // add haptic feedback for control events
func removeHaptic(forControlEvents events: UIControl.Event) {} // remove haptic feedback for control events
Add sound effects to Haptica using Peep.
Peep.play(sound: KeyPress.tap)
To install with CocoaPods, simply add this in your Podfile
:
use_frameworks!
pod “Haptica”
To install with Carthage, simply add this in your Cartfile
:
github “efremidze/Haptica”
NavigationKit is a lightweight library which makes SwiftUI navigation super easy to use. 💻 Installation 📦 Swift Package Manager Using Swift Package Manager, add ...
An alternative SwiftUI NavigationView implementing classic stack-based navigation giving also some more control on animations and programmatic navigation. NavigationStack Installation ...
With SwiftUI Router you can power your SwiftUI app with path-based routing. By utilizing a path-based system, navigation in your app becomes ...
This package takes SwiftUI's familiar and powerful NavigationStack API and gives it superpowers, allowing you to use the same API not just ...