Skip to Content
zjkm-ui
Components

Bending Lines

Lines that bend toward the cursor.

ProPro, coming soon.

Bend the lines

Props
18
36px
<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

PropTypeDefaultDescription
childrenReactNodeContent shown over the lines.
colorstring"#818cf8"Line colour.
countnumber18Number of lines.
strengthnumber36Pixels a line bends at the pointer.
radiusnumber140Pixels of influence.
classNamestringClasses for the wrapper.

With reduced motion, it draws one still frame and doesn't react to the pointer.

On this page