Components
Bending Lines
Lines that bend toward the cursor.
ProPro, coming soon.
Bend the lines
<BendingLines>
<Hero />
</BendingLines>Get notified
Bending Lines is a Pro effect. Join the waitlist and we'll email you when it's available.
Usage
Horizontal lines that bend toward the pointer as it passes, then relax back to straight when it leaves. It draws on a canvas, and the drawing stops while it's off-screen or the tab is hidden. Without canvas support, your content shows on its own.
import { BendingLines } from "@zjkm/pro/bending-lines";
export function Hero() {
return (
<BendingLines className="rounded-2xl bg-neutral-950 p-16">
<h1 className="text-white">Bend the rules</h1>
</BendingLines>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Content shown over the lines. | |
color | string | "#818cf8" | Line colour. |
count | number | 18 | Number of lines. |
strength | number | 36 | Pixels a line bends at the pointer. |
radius | number | 140 | Pixels of influence. |
className | string | Classes for the wrapper. |
With reduced motion, it draws one still frame and doesn't react to the pointer.