Cursor & Interaction Effects

Invert Cursor

영역 안에서 배경을 반전시키는 혼합 모드 커서 효과입니다.

Preview

cursor effect

Invert

move to invert the surface

Installation

bash
Copied
1pnpm dlx shadcn@latest add https://ryong.dev/r/mouse-invert-cursor.json

Code

typescript
Copied
1import { MouseInvertCursor } from "@/components/mouse-invert-cursor"23export default function Example() {4  return (5    <MouseInvertCursor size={50} smoothness={0.08}>6      <div className="min-h-64">Move inside</div>7    </MouseInvertCursor>8  )9}

Props

PropTypeDefaultDescription
childrenReact.ReactNode-Content rendered inside the component.
classNamestring-Additional classes merged onto the component.
sizenumber50Invert cursor diameter in pixels.
colorstring"#ffffff"Blend color used by the cursor circle.
smoothnessnumber0.08Lerp factor copied from the playground default.
hideDefaultbooleantrueWhether to hide the native cursor inside the component.
disabledbooleanfalseWhether to disable the cursor effect.

Reference

mouse-animations playground