Point Cursor
A sophisticated custom cursor system that transforms the standard mouse pointer into a precision instrument. It features a center dot and a smooth trailing ring that dynamically reacts to interactive elements, providing a premium feel to any section or entire application.
uiclsxframer-motiontailwind-merge
Installation
$npx futureuikit add point-cursor
Import
import { PointCursor } from "@/components/ui/PointCursor"
Layout Variant
Color Theme
Named Keys & Props
Pass these exact named keys as props on <PointCursor />. Click any color pill to copy the prop.
colorDefault is "default"(Black & White)variantVisual style"default""stretch""snappy""fluid"shapeCorner shape"default""square""rounded""sharp"spacingInner spacing"default""2x""4x""6x""8x"Usage Example
A basic implementation example to get you started.
Example Implementation
import { PointCursor } from"@/components/ui/PointCursor";
export default function Example() {
return (
<PointCursor>
<section className="min-h-100 flex items-center justify-center bg-slate-900 text-white rounded-3xl p-12">
<div className="text-center">
<h2 className="text-3xl font-bold mb-4">Hover anywhere here!</h2>
<button className="bg-white text-black px-6 py-2 rounded-full font-medium">
Interactive Button
</button>
</div>
</section>
</PointCursor>
);
}Features
Key capabilities and highlights.
Key Capabilities
- ◆Built with Framer Motion for high-performance, physics-based animations.
- ◆Smart isolation: the custom cursor is only active within the wrapped container.
- ◆Intelligent hover detection: automatically expands when hovering over links, buttons, or elements with the'clickable'class.
- ◆Smooth trailing effect using spring-based motion values.
- ◆Fully customizable colors for both the central dot and the trailing ring.
- ◆Accessibility conscious: falls back to the system cursor when not active.
Notes
Important implementation details to consider.
Implementation Details
- ◆Install: Run'npx futureuikit add point-cursor'.
- ◆Import:'import { PointCursor } from "@/components/ui/PointCursor";'
- ◆Implementation: Wrap the container you want the cursor active in. The component automatically hides the default system cursor.
- ◆Reactivity: The ring expands automatically for'button'and'a'tags. Add the'clickable'class to any other element for the same effect.
- ◆Visuals: Pass'dotColor'and'ringColor'props (CSS color strings) to match your design palette.