Loading...
Loading...
Loading...
รวม cursor effect patterns — follower, spotlight, trail ใช้ Framer Motion + CSS รองรับ custom icon และ element
วงกลมที่ลอยตาม mouse ด้วย spring animation — รองรับ children สำหรับใส่ icon หรือ custom element
Cursor Follower — Usage
containerRef — track mouse ภายใน element ที่กำหนดchildren — ใส่ icon/emoji แทน dot ได้springConfig — ปรับความเร็ว/lag ของ followerOverlay มืดที่เปิดเผยเนื้อหาด้วยวงแสง radial-gradient ตรงตำแหน่ง mouse
Cursor Spotlight — Usage
radius — ขนาดวงแสง (default 120px)overlayOpacity — ความเข้มของพื้นหลังมืด (0-1)requestAnimationFrame throttle อัตโนมั��ิจุดหลายจุดตาม mouse path แล้ว fade out — รองรับ custom renderDot สำหรับเปลี่ยนเป็น icon/emoji
Cursor Trail — Usage
renderDot — เปลี่ยน dot เป็น icon/emoji/custom elementthrottleMs — ควบคุมความถี่ (default 30ms)lifetime — อายุแต่ละ dot ก่อน fade out (default 500ms)timeoutsRef ป้องกัน memory leakMulti-layer circles + orbiting dots ตาม mouse — ใช้ useMotionValue + useSpring (0 React re-renders) + event delegation + CSS orbit animation — ใช้จริงในหน้านี้
Neon Cursor — Component (NeonCursor)
ลอง effect ได้เลย — neon cursor ทำงานทั้งหน้านี้
Neon Cursor — Setup & Tokens
globals.css — cursor tokens (auto dark/light)data-cursor-zone — ซ่อน neon ใน preview boxesPageNeonCursor — ครอบ page content ใน Server Component ได้