Black Friday: 30% off Pro

Get 30% off

Pull Toward Cursor

Preview

Customize

Strength0.18
Radius110px
Sweep0.9s
Text size48px

Installation

npx shadcn@latest add https://uibrik.com/r/pull-to-cursor.json
Adds the files to components/uibrik/pull-to-cursor and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/pull-to-cursor.

Usage

import { PullToCursor } from "@/components/uibrik/pull-to-cursor/pull-to-cursor";​<PullToCursor  play={0}  text="Drawn together"  strength={0.18}  radius={110}  sweepDuration={0.9}/>

Where to use Pull Toward Cursor

  • Interactive headlines

    Letters leaning toward the cursor like a magnet make a title respond to the visitor.

    Pairs with Hover Weight

  • Agency sites

    Magnetic type is a small interaction that signals attention to detail.

  • Fun 404 pages

    Something that follows the pointer softens a dead end.

Props

PullToCursor
text
Type string
"Drawn together"
The copy to animate.
strength
Type number
0.18
How far letters lean toward the pointer.
radius
Type number
110
Reach of the pull.
sweepDuration
Type number
0.9
Replay sweep across the line.
playrequired
Type number
–
Each change plays the effect again; 0 shows its resting state.