Component packs › Tug › Pull Cord

Pull Cord

A real rope with a bead: pull past the click and the light floods out from the bead, then the cord swings itself still.

Pull Cord is a gesture from Tug, a component pack with 8 gestures: Eight pull gestures that follow your finger and let go like real material. Price: $2 for the whole pack.

Built with: verlet rope, circular light wipe, keyboard pull.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Pull Cord props

PropTypeDefaultDescription
darkboolean
widthnumber
onboolean
autoplayboolean
onChange(on: boolean) => void

Methods on the ref

Use it in React

import PullCord from './PullCord';

<PullCord />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Tug

Good for: Drag and pull gestures.