Animate UI

Cursor

An animated cursor component that allows you to customize both the cursor and cursor follow elements with smooth animations.

Made by imskyleen
Edit on GitHub

Move your mouse over the div

Installation

Usage

Global

<CursorProvider>
  <Cursor>
    <div>Cursor</div>
  </Cursor>
  <CursorFollow>
    <div>Cursor Follow</div>
  </CursorFollow>
</CursorProvider>

Local

<CursorProvider>
  <CursorContainer>
    <Cursor>
      <div>Cursor</div>
    </Cursor>
    <CursorFollow>
      <div>Cursor Follow</div>
    </CursorFollow>
  </CursorContainer>
</CursorProvider>

API Reference

CursorProvider

PropTypeDefault
children
React.ReactNode
-
global?
boolean
false

CursorContainer

PropTypeDefault
asChild?
boolean
false
...props?
HTMLMotionProps<"div">
-

Cursor

PropTypeDefault
asChild?
boolean
false
...props?
HTMLMotionProps<"div">
-

CursorFollow

PropTypeDefault
asChild?
boolean
false
side?
CursorFollowSide
bottom
sideOffset?
number
0
align?
CursorFollowAlign
end
alignOffset?
number
0
transition?
SpringOptions
{ stiffness: 500, damping: 50, bounce: 0 }
...props?
HTMLMotionProps<"div">
-

Built by Skyleen. The source code is available on GitHub.