Drag, pull and swipe gesture components

A gesture feels right when the element follows the finger exactly and finishes the motion at the speed you let go. Every gesture also needs a keyboard alternative.

Tug is eight gestures on one physics core: while your finger is down the element moves 1:1 with rubber resistance past the edges, and when you lift, a spring seeded with your release speed finishes the motion. Rubber Refresh is a pull to refresh, Elastic Sheet a bottom sheet with three snaps, Swipe Dismiss throws a preview away, Hold Reveal clears a blurred code from where you press, Shake Undo brings back a swiped row, and Pull Cord, Slingshot and Fishing Reel make playful controls of a rope, a launch and a winding handle.

The pack

What a good one needs

Questions

Do they work with a mouse?

Yes. They work with touch and pointer, and every gesture has a keyboard alternative.

Does it work in React, Vue and plain HTML?

Yes. Every screen ships as one framework-free core with React, Next.js, Vue, HTML, Tailwind and Motion versions.

How much does it cost?

Tug is $2, paid once for the whole pack.

Which frameworks are included?

React (TypeScript), Next.js App Router, Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion. React, Vue and HTML are each a thin wrapper over one framework-free core, so they look and move the same. The Next.js version is the React component marked as a client component, with an app/page.tsx example. The Tailwind version adds the pack colours as Tailwind theme tokens, so you place, size and recolour it with utility classes. The Motion version wraps it in a motion.div so you can animate it in, out and on scroll with Motion props; the motion inside still runs on its own engine. Most packs need no npm packages; the 3D ones use Three.js.

Can I use it in client and commercial projects?

Yes. Every pack can be used in unlimited personal and commercial projects, including client work. Paid packs cannot be resold or redistributed as a component library, template or UI kit; free packs are open source under the MIT License, so you may share them too.

Related