
Hyper Effects

Composable effects, spring animations, and keyframe timelines for Flutter.
Want a favorite button to bounce when tapped? A feed of cards to blur, tilt, and come into focus as you scroll? A card to slide into view? A checkmark to pop, overshoot, and settle? Start with your Flutter widget, add the effects you want after it, and tell them when to move. Hyper Effects takes inspiration from SwiftUI's modifier syntax, while keeping everything in Flutter's widget tree.
Live demo · API reference
Examples
Scroll Transition
|
Scroll Wheel
|
Scroll Blur
|
Shake
|
Windows Hover Effect
|
Scroll Color Filter
|
Spring Animation
|
Animation Chain
|
Rolling Text 2
|
Rolling Text 3
|
Rolling Text 4
|
Quick start
Add this package to your dependencies in your pubspec.yaml file.
dependencies:
hyper_effects: <latest_version>
After publication, use hyper_effects: ^0.4.0 instead. For reproducible development builds, pin a commit rather than a moving branch.
Let's start with a favorite button. When you tap it, the heart grows a little; tap it again, and it returns to its normal size. We don't need to manage an animation controller for this. Describe the two sizes and let a spring handle the journey.
import 'package:flutter/material.dart';
import 'package:hyper_effects/hyper_effects.dart';
class FavoriteButton extends StatefulWidget {
const FavoriteButton({super.key});
@override
State<FavoriteButton> createState() => _FavoriteButtonState();
}
class _FavoriteButtonState extends State<FavoriteButton> {
bool selected = false;
@override
Widget build(BuildContext context) {
final reduceMotion = MediaQuery.disableAnimationsOf(context);
return IconButton(
tooltip: selected ? 'Remove favorite' : 'Add favorite',
onPressed: () => setState(() => selected = !selected),
icon: Icon(selected ? Icons.favorite : Icons.favorite_border)
.scale(selected ? 1.2 : 1)
.animate(
trigger: selected,
motion: const CupertinoMotion.snappy(),
skipIf: () => reduceMotion,
),
);
}
}
Guide