In my free time, I enjoy exploring UI/UX innovations by couple of design engineers on Twitter. As weekend or lab-style projects, I often challenge myself to recreate their stunning components in Flutter โ pushing the boundaries of interactivity and polish on mobile.
While I plan to eventually bundle these into a full Awesome UI package, here are two published components that are already available for use.
๐ HoldToActionButton
Based on Emil Kowalski’s “Hold to Delete” button
This component is a press-and-hold button that executes an action after a hold duration completes โ perfect for preventing accidental taps in destructive actions.
๐ง Features
- Press-and-hold gesture with progress animation
- Callback triggered on hold completion (
onHoldComplete
) - Fully customizable: colors, hold duration, icons, etc.
๐ Live Preview
๐ Try it Live
๐ AnimatedRotateButton
Inspired by a UI component shared by Jakub Krehel
This Flutter widget recreates a rotating toggle button with animated transitions between multiple states. I’ve enhanced the concept to support multiple configurations beyond a binary toggle.
๐ง Features
- Smooth rotation animation with state cycling
- Supports multiple icon states and callbacks
- Great for toggling settings, views, or modes
๐ Live Preview
๐ Try it Live
๐ฆ How to Use
You can easily use these components by copying the source code into your project:
- Create a folder:
lib/external_components/
- Add the component file (e.g.
hold_to_action_button.dart
) - Import and use the widget in your Flutter app
import 'external_components/hold_to_action_button.dart';
HoldToActionButton(
onHoldComplete: () {
// Your action here
},
)
These UI experiments are open to feedback and contributions โ and will eventually be bundled into a reusable Flutter package for the community.