Component packs › Stitch › Yarn Loader

Yarn Loader

A ball of yarn rolls to and fro, winding on and paying out its yarn, then winds it all back in when done.

Yarn Loader is a loader from Stitch, a component pack with 6 thread controls: Controls that are sewn, knitted and embroidered, with real thread physics. Price: $2 for the whole pack.

Built with: no-slip roll, rope on a floor, wind in.

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.

Yarn Loader props

PropTypeDefaultDescription
widthnumber
labelstring
autoplaynumber | false

Methods on the ref

Use it in React

import YarnLoader from './YarnLoader';

<YarnLoader />

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

More in Stitch

Good for: Toggle switches, Loaders and progress, Physics UI components.