Documentation

Documentation

Cursor

This feature is available with Motion+

This feature is available with Motion+

This feature is available with Motion+

Checking Motion+ status…

Cursor

is exclusive to Motion+

300+ examples & 40+ tutorials

Premium APIs

Motion Studio editing tools

alpha

Discord community

Early access

Lifetime updates

One-time payment, lifetime updates

Already joined?

Checking Motion+ status…

Cursor

is exclusive to Motion+

300+ examples & 40+ tutorials

Premium APIs

Motion Studio editing tools

alpha

Discord community

Early access

Lifetime updates

One-time payment, lifetime updates

Already joined?

Checking Motion+ status…

Cursor

is exclusive to Motion+

300+ examples & 40+ tutorials

Premium APIs

Motion Studio editing tools

alpha

Discord community

Early access

Lifetime updates

One-time payment, lifetime updates

Already joined?

Cursor is a powerful React component for building creative and interactive cursor effects. Effortlessly replace the default browser cursor, create engaging follow-cursor animations, or add magnetic snapping to UI elements.

Built on Motion's layout animations, Cursor is performant and full customisable with variants, CSS and custom React components.

<Cursor />

Cursor is exclusive to Motion+ members. Motion+ is a one-time payment, lifetime membership that unlocks exclusive components, premium examples and access to a private Discord community.

Features

  • Two modes: Easily switch between replacing the default cursor or creating a "follow" cursor effect.

  • State-aware: Automatically adapts its appearance when hovering over links, buttons, or selectable text, and when pressed.

  • Magnetic: Make the cursor snap to interactive elements on hover for a tactile feel.

  • Customisable: Use CSS, Motion variants, and custom React components to create any cursor you can imagine.

  • Accessible: Can be disabled for users who prefer reduced motion.

Install

First, add the Motion+ library to your project using your private token. You need to be a Motion+ member to generate a private token.

npm install https://api.motion.dev/registry\?package\=motion-plus\&version\=1.5.4\&token

Once installed, Cursor can be imported via motion-plus/react:

import { Cursor } from "motion-plus/react"

Usage

The Cursor component is used for both custom cursor and follow cursor effects:

import { Cursor } from "motion-plus/react"

When Cursor is rendered, a default custom cursor will render on the page, hiding the browser's default cursor.

<Cursor />

You can remove the cursor and restore the browser cursor at any time by removing the component.

{isCursorVisible ? <Cursor /> : null}

Styling

By default, the cursor is a neutral grey color. It's possible to change the cursor's styles using CSS.

<Cursor className="my-cursor" style={{ backgroundColor: "red" }} />


Related topics

Previous

Carousel

Next

Ticker

Motion+

Motion+

Motion+

Level up your animations with Motion+

Unlock the full vault of 300+ Motion examples, premium APIs, private Discord and GitHub, and powerful VS Code animation editing tools.

One-time payment, lifetime updates.

Motion is supported by the best in the industry.