FreeInteraction
Red Thread
A thread with Verlet physics that follows the cursor, pulls taut against its anchor and swings.
- Plan
- Free · MIT
- Dependencies
- React only
- Props
- 11 (8 adjustable)
Free forever
MIT license, for personal and commercial projects. See installation
Move the cursor
Made with Furin: Pill Nav · Metal Button · Copy Morph
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | "" | Optional content of the container; the thread is drawn on top without blocking clicks. |
color | string | "#E8452C" | Color of the thread. |
segments | number | 28 | How many segments the thread has: more segments mean smoother curves and more computation. |
thickness | number | 3 | Thickness of the thread in px. |
gravity | number | 1400 | Strength of gravity in px/s²: 0 floats, higher hangs heavier. |
stiffness | number | 0.95 | How inextensible the thread is, from 0.05 (elastic) to 1 (doesn't stretch). |
anchor | "none" | "center" | "top" | { x: number; y: number } | "top" | Fixed end: "none" (the thread just follows the cursor), "center", "top" or a point { x, y } as fractions from 0 to 1. |
length | number | 0 | Total length of the thread in px; 0 computes it from the container size. |
glow | number | 0.7 | Intensity of the glow around the thread, from 0 to 1. |
className | string | "" | Extra CSS class for the container. |
style | CSSProperties | "{}" | Inline styles for the container. |
Installation
Install it
1Install the package
npm i furin-ui2Import it
import { RedThread } from "furin-ui";Also with pnpm add furin-ui, yarn add furin-ui or bun add furin-ui. Each component ships its own CSS and imports it for you.
Dependencies
- React
- 18 or later
- Other libraries
- none
- License
- MIT
Each file ships its own CSS: there's nothing else to install.