Custom Cursor

Interactive cursor component with smooth animations and target morphing

custom-cursor-tw
With Image
No Image
Circle

Customize

40px
6px
150
20
300
30
2px
0px

Props

NameTypeDefaultDescription
circleSizenumber40Size of the outer circle in pixels
dotSizenumber6Size of the inner dot in pixels
circleColorstring"rgb(0, 0, 0)"Color of the outer circle (any valid CSS color)
dotColorstring"rgb(0, 0, 0)"Color of the inner dot (any valid CSS color)
circleStiffnessnumber150Spring stiffness for the outer circle (higher = faster)
circleDampingnumber20Spring damping for the outer circle (higher = less bounce)
dotStiffnessnumber300Spring stiffness for the inner dot (higher = faster)
dotDampingnumber30Spring damping for the inner dot (higher = less bounce)
circleBorderWidthnumber2Border width of the outer circle in pixels
classNamestring""Additional class name for the container
circleClassNamestring""Additional class name for the circle
dotClassNamestring""Additional class name for the dot
showOnTouchbooleanfalseWhether to show the cursor on touch devices
zIndexnumber9999Z-index of the cursor
elasticbooleanfalseEnable subtle elastic stretch in direction of movement
imageClassNamestring""Additional class name for the image elements
targetPaddingnumber0Padding between cursor and target in pixels
targetsstring[][]CSS selectors for target elements to trigger effects on hover
images(string | undefined)[][]Image URLs corresponding to each target (optional - targets without images will still morph the cursor)
imageScalenumber0.9Scale amount for images when hovering targets (0-1)
imageAnimationDurationnumber0.6Duration of image scale animation in seconds
mixBlendModestringundefinedMix blend mode for the cursor elements
childrenReact.ReactNodeundefinedCustom content to render inside the cursor