Avara UI

Cursor Animation

An interactive, 100% full-width and responsive custom cursor component with 10 distinct animation variants including fluid physics, particle trails, magnetic targeting, spotlight masking, and precision crosshairs.
CursorAnimation enhances pointer interactions over designated containers with customizable animations, seamless dark mode support, and fluid responsive physics for all devices.

Image Trail Cursor

Usevariant"image-trail"
to spawn interactive image cards dynamically centered on pointer movement.
color
themes every variant — a named key (primary, indigo, rose, emerald, zinc) or a hex string.

Installation

New project? Follow the installation guide to set up Tailwind CSS, shadcn, the cn helper and lucide-react, register the @algorize-ui registry once, then copy your styles from the Themes page.

Install Cursor Animation

npx shadcn@latest add @algorize-ui/cursor-animation

components/custom/blocks/CursorAnimationBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Nothing beyond the shared setup — Cursor Animation needs only the cn helper and lucide-react, which the installation guide already put in place.

Examples

Glow Cursor

Usevariant"glow"
for a blurred background glow that trails the pointer on smooth physics. It is the default.

Magnetic Target Cursor

Usevariant"magnetic"
for a dashed target ring that rotates as the pointer moves.

Particle Trail Cursor

Usevariant"trail"
for a trail of particles that fade out behind the cursor.
trailCount{6}
sets how many particles trail — only read by this variant.

Badge Label Cursor

Usevariant"badge"
to float a pill label beside the pointer.
label"View Project"
is the pill text, defaulting to Explore. Only read by this variant.

Spotlight Mask Cursor

Usevariant"spotlight"
to mask the area in a radial spotlight, darkening everything the cursor is not on.

Expand Scaling Cursor

Usevariant"expand"
for an inverted backdrop circle that scales up on hover and click.

Precision Crosshair Cursor

Usevariant"crosshair"
to draw full-width and full-height guide lines through the pointer.

Smooth Ring Cursor

Usevariant"ring"
for a minimal lerped ring that contracts on click.

Radial Pulse Cursor

Usevariant"pulse"
for a radial aura that pulses around the pointer.

Sonar Wave Cursor

Usevariant"sonar"
for two concentric rings sweeping outward in sync with movement.

Features

Discover the key interactive capabilities of the CursorAnimation block:

10 Distinct Variants

Choose from glow, magnetic, particle trail, badge label, spotlight, crosshair, and 4 other fluid styles.

Fluid Physics & Lerp

Smooth linear interpolation (LERP) physics ensures natural inertia and responsive cursor tracking.

100% Full-Width Responsive

Adapts seamlessly to container boundaries across desktop, tablet, and mobile screens without breaking overflow.

Dark Mode Native

Pre-configured with zinc dark mode palettes matching site design tokens and contrast guidelines.

Best Practices & Guidelines

Usage Guidelines

Use CursorAnimation to highlight hero sections, portfolio cards, interactive canvas areas, or custom action areas. Ensure pointer-events are set correctly when layering over interactive text or buttons.

Props Reference

PropTypeDefaultDescription
variant"glow" | "magnetic" | "trail" | "badge" | "spotlight" | "expand" | "crosshair" | "ring" | "pulse" | "sonar""glow"Selects the active cursor animation style and interaction physics.
labelstring"Explore"Text displayed inside the floating badge pill when variant="badge".
colorCursorColor | string"primary"Applies dynamic theme color palettes ("primary" | "indigo" | "rose" | "emerald" | "zinc" or custom hex).
trailCountnumber6Number of trailing particles rendered when variant="trail".
classNamestring""Custom Tailwind CSS classes applied to the root container.
childrenReact.ReactNodeundefinedCustom interactive element content rendered inside the cursor hover zone.