Join our Discord Community
Layout

Cursor

Interactive cursor indicator component for React and Next.js applications. Built with TypeScript support, Tailwind CSS styling, and shadcn/ui design featuring real-time positioning, customizable appearance, and accessibility features.

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/cursor.json
npx shadcn@latest add https://www.shadcn.io/registry/cursor.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/cursor.json
bunx shadcn@latest add https://www.shadcn.io/registry/cursor.json

Features

  • Custom colors - Cursor color customization with automatic contrast adjustment using Tailwind CSS utilities
  • Name labels - Optional user identification with tooltip-style display using TypeScript props
  • Message display - Real-time message showing with smooth positioning using JavaScript coordinates
  • Smooth rendering - Optimized performance with efficient DOM updates for React applications
  • Accessibility features - Complete ARIA attributes and screen reader support using shadcn/ui patterns
  • Responsive design - Works across device sizes with touch-friendly interactions for Next.js projects
  • Open source - Free cursor component with customizable appearance and positioning

Examples

Cursor only

Loading component...

Cursor with name

Loading component...

Cursor with message

Loading component...

Cursor with name and message

Loading component...

Cursor with custom color

Loading component...

Use Cases

  • Collaborative editing - Multi-user document and code editing interfaces
  • Live presentations - Speaker cursor highlighting and audience engagement
  • Gaming interfaces - Player position indicators and real-time interactions
  • Design tools - Collaborative whiteboarding and creative workspace applications

Implementation

Built with absolute positioning and real-time coordinate tracking. Supports custom colors with contrast calculations. Optimized for performance with minimal re-renders. ARIA-compliant for accessibility.