EmergeTools / Pow

Delightful SwiftUI effects for your app
https://movingparts.io/pow
MIT License
3.66k stars 153 forks source link

0.1.0 #8

Closed robb closed 2 years ago

robb commented 2 years ago

As always, if you're interested in using Pow in your app, you can now purchase a license on our site. ✨

Thank you for your support!

New in 0.1.0

Change effects:

https://user-images.githubusercontent.com/212465/192332727-3371f9eb-0c12-4c89-8c58-9b9f2cf52679.mov

Version 0.1.0 of Pow introduces Change Effects that will trigger a visual or haptic effect every time a value changes.

Button {
    post.toggleLike()
} label: {
    Label(post.likes.formatted(), systemName: "heart.fill")
}
.changeEffect(.spray { heart }, value: post.likes, isEnabled: post.isLiked)
.tint(post.isLiked ? .red : .gray)

Currently, you can choose from 8 difference Change Effects:

Spray

Emits multiple particles in different shades and sizes moving up from the origin point.

.spray(origin: .center) { Image(systemName: "heart.fill") }

Haptic Feedback

Triggers the given haptic feedback type whenever a value changes.

.hapticFeedback(.success)

Jump

Makes the view jump the given height and then bounces a few times before settling.

.jump(height: 50)

Ping

Adds one or more shapes that slowly grow and fade-out behind the view.

.ping(shape: Capsule(), style: .red, count: 3)

Rise

Emits the provided particle from the origin point and slowly float up while moving side to side.

.rise(origin: .top) { Text("+1") }

Shake

Shakes the view when a change happens.

.shake(rate: .fast)

Shine

Highlights the view with a shine moving over the view.

.shine

Spin

Spins the view around the given axis when a change happens.

.spin(axis: (x: 1, y: 0, z: 0))

Quality of Life Improvements