Build interactive UI from first principles
Plain-code tutorials for React and Flutter. Each one builds a real interaction step by step, and every card below runs the finished result so you can feel it before you read it.
- Tutorials
- 30
- Frameworks
- 5
- Reading time
- 3.4 h
Loading demo
Every tutorial, running live
Drag, tap and hover the demos. Open a card for the step-by-step build and the accessibility checklist.
- Loading demoReact7 min readHow to Build a Magnetic Button in ReactStep-by-step guide to building a smooth, interruptible magnetic button in React using Pointer Events, requestAnimationFrame, and a lightweight spring integrator.
- Loading demoReact9 min readHow to Create a Draggable Card Stack with Spring PhysicsBuild a tactile, interruptible draggable card stack in React with grip-aware rotation, velocity fling projection, behind-card scaling, and keyboard navigation.
- Loading demoReact7 min readHow to Implement Swipe-to-Delete in ReactLearn how to build accessible swipe-to-delete rows in React with axis locking, rubber-band drag resistance, snap thresholds, and desktop keyboard fallbacks.
- Loading demoReact6 min readHow to Create an Animated Add-to-Cart ButtonBuild a state-transitioning Add to Cart button in React with Idle, Loading, Success, and Error states, smooth width morphing, spam protection, and aria-live announcements.
- Loading demoReact6 min readHow to Build a Custom Loading Animation with CSSDesign GPU-friendly custom CSS and SVG loaders using stroke-dashoffset, transform-only keyframes, determinate progress bars, and reduced-motion fallbacks.
- Loading demoReact8 min readHow to Create Interactive Dragging with Pointer EventsMaster unified mouse, touch, and pen dragging in React using setPointerCapture, touch-action, velocity sampling, and clean pointercancel recovery.
- Loading demoReact8 min readHow to Implement Spring Physics Without a Heavy Animation LibraryWrite a rock-solid 45-line semi-implicit Euler spring engine in TypeScript with fixed 120 Hz sub-stepping, zero dependencies, and true velocity preservation.
- Loading demoReact7 min readHow to Make an Interactive Dock in ReactBuild a smooth magnification dock in React using Gaussian pointer distance falloff, spring scaling, and accessible roving-tabindex keyboard toolbar navigation.
- Loading demoReact7 min readHow to Create a Scroll-Driven AnimationLearn modern CSS animation-timeline: scroll() and view() alongside a zero-jank passive scroll + requestAnimationFrame fallback in React.
- Loading demoReact8 min readHow to Handle Interrupted Animations in ReactLearn why rapid clicks, mid-flight drags, and unmounts break React animations—and how velocity-preserving springs and proper cleanup make them unbreakable.
- Loading demoReact6 min readHow to Animate a Button Press in ReactLearn how to make a React button shrink on press and spring back on release, first with plain CSS, then with a small spring hook that handles pointer, keyboard and reduced motion.
- Loading demoReact7 min readHow to Respect prefers-reduced-motion in ReactLearn what prefers-reduced-motion means, how to read it in CSS and in a React hook that updates live, and which animations to remove, shorten or keep for accessible motion.
- Loading demoReact8 min readHow to Add Sound Effects to React UIAdd short click and pop sounds to React buttons with the Web Audio API: no audio files, autoplay rules, a global mute switch, volume levels that don't annoy, and when to skip sound entirely.
- Loading demoReact7 min readHow to Animate an Accordion Open and Closed in ReactAnimate an accordion panel from 0 to auto height in React using the CSS grid 0fr to 1fr technique, with correct aria-expanded wiring, hidden-content focus handling and reduced motion.
- Loading demoReact6 min readHow to Build an Animated Toggle Switch in ReactBuild an accessible animated toggle switch in React with role="switch", aria-checked, keyboard support and a smooth knob animation, then compare it with a spring-based switch.
- Loading demoReact7 min readHow to Show a Loading Indicator While Fetching Data in ReactShow a loading indicator while fetching data in React without flicker: delay the spinner, keep it visible for a minimum time, cancel stale requests, and announce loading and errors.
- Loading demoReact6 min readHow to Animate a Number Counting Up in ReactAnimate a number counting up in React with requestAnimationFrame and an easing curve, format it with Intl.NumberFormat, stop width jitter with tabular numbers, and keep it readable for screen readers.
- Loading demoReact7 min readHow to Build a Hold-to-Confirm Button in ReactBuild a press-and-hold confirm button in React for destructive actions: progress driven by requestAnimationFrame, cancel on early release, keyboard hold support and an SVG progress ring.
- Loading demoFlutter5 min readHow to Install and Use Kipluo in a Flutter AppAdd the kipluo package to a Flutter app, wrap your app in KipluoTheme, use your first animated widget, control sound globally or per widget, and install paid widgets as Dart source.
- Loading demoFlutter8 min readFlutter Spring Animation BasicsLearn how spring animations work in Flutter: SpringDescription, SpringSimulation, AnimationController.animateWith, carrying drag velocity into the spring, and choosing stiffness and damping.
- Loading demoFlutter7 min readHow to Build a Swipe Action in FlutterBuild swipe-to-delete in Flutter with Dismissible and an undo SnackBar, add a non-gesture delete path for accessibility, then reveal multiple row actions with a spring-based swipe widget.
- Loading demoFlutter7 min readHow to Add Haptics and Sound to Flutter ButtonsAdd haptic feedback and tap sounds to Flutter buttons with HapticFeedback, Feedback.forTap and SystemSound, learn what each does on iOS and Android, and add synthesized UI sounds with a mute switch.
- Loading demoFlutter8 min readHow to Build a Custom Loader Widget in FlutterBuild a custom loading indicator in Flutter with CustomPainter and a repeating AnimationController, support determinate progress, add semantics, and stop the loop when reduce motion is on.
- Loading demoFlutter6 min readHow to Animate Icons in FlutterThree ways to animate icons in Flutter: built-in AnimatedIcon morphs, swapping icons with AnimatedSwitcher, and interactive icon buttons that react to tap and hover with springs and sound.
- Loading demoFlutter5 min readHow to Animate a Number Counter in FlutterAnimate a number counting up in Flutter with TweenAnimationBuilder, keep digits from jumping with tabular figures, read the final value to screen readers, and skip the animation when reduce motion is on.
- Loading demoFlutter6 min readHow to Build an Animated Accordion in FlutterBuild an animated accordion in Flutter: start with ExpansionTile, then write a custom panel with AnimatedAlign and AnimatedRotation, correct expanded semantics, and focus handling for hidden content.
One button, 4 ways to build it
The same magnetic button written for each stack. Switch tabs to see how the code changes, not just the import line.
Loading demoMove your pointer near it