Task: Custom Cursor Implementation
Description
Implement custom cursor design using pure CSS for performance. Different cursor states for various contexts (pointer, text, loading, drag). Option to disable in settings.
Acceptance Criteria
Technical Details
Implementation Approach
- Create
src/styles/cursor.css with custom cursor definitions:
.custom-cursor {
cursor: url('/cursors/default.svg'), auto;
}
.custom-cursor-text {
cursor: url('/cursors/text.svg'), text;
}
/* etc. */
- Create cursor SVG assets in
public/cursors/:
default.svg - Custom pointer
text.svg - Text selection cursor
loading.svg - Loading state
drag.svg - Dragging state
- Create
useCursor hook for managing cursor state
- Add cursor toggle to settings
- Apply cursor class to document body conditionally
Key Considerations
- Keep SVG files small (<2KB each)
- Use CSS variables for cursor colors (theme-aware)
- Fallback to system cursor on old browsers
- Test cursor visibility on different backgrounds
- Cursor should be 16x16 or 24x24 pixels (standard size)
- No JavaScript-based cursor tracking (performance)
Files Affected
src/styles/cursor.css (new)
public/cursors/*.svg (new assets)
src/hooks/useCursor.ts (new)
src/app/globals.css (import cursor styles)
src/app/[locale]/layout.tsx (apply cursor class)
- Settings component (add cursor toggle - create if needed)
Dependencies
Effort Estimate
- Size: S (Small)
- Hours: 6-8 hours
- Parallel: true (can run parallel with other tasks)
Definition of Done
Task: Custom Cursor Implementation
Description
Implement custom cursor design using pure CSS for performance. Different cursor states for various contexts (pointer, text, loading, drag). Option to disable in settings.
Acceptance Criteria
Technical Details
Implementation Approach
src/styles/cursor.csswith custom cursor definitions:public/cursors/:default.svg- Custom pointertext.svg- Text selection cursorloading.svg- Loading statedrag.svg- Dragging stateuseCursorhook for managing cursor stateKey Considerations
Files Affected
src/styles/cursor.css(new)public/cursors/*.svg(new assets)src/hooks/useCursor.ts(new)src/app/globals.css(import cursor styles)src/app/[locale]/layout.tsx(apply cursor class)Dependencies
Effort Estimate
Definition of Done