Copy to clipboard
The most repeated swap: Copy settles into Check.
A hardened core for production motion. Flutter-native morphing that keeps state local, geometry explicit and springs physical — from clipboard confirmation to file-tree disclosure. Six everyday interactions where a morph clarifies intent without adding chrome.
The most repeated swap: Copy settles into Check.
Eye to EyeOff on the input's trailing button.
Sun to Moon in one slot — no double SVG.
Play and pause, plus mute on the same cluster.
Trailing icon tracks the field: Check when valid, X when not.
Folders morph open; the disclosure chevron stays CSS.
Dart usage
import 'package:flutter/material.dart';
import 'package:morphicons_lucide/morphicons_lucide.dart';
import 'package:morphicons_flutter/morphicons_flutter.dart';
class CopyButton extends StatefulWidget {
const CopyButton({super.key});
@override
State<CopyButton> createState() => _CopyButtonState();
}
class _CopyButtonState extends State<CopyButton> {
var copied = false;
@override
Widget build(BuildContext context) => IconButton(
onPressed: () => setState(() => copied = true),
icon: MorphIcon(icon: copied ? MorphIconsLucide.check : MorphIconsLucide.copy),
tooltip: copied ? 'Copied' : 'Copy',
);
}