Skip to main content

Overview

The HoverHighlighter component wraps content to visually highlight it when other users hover over it. It provides real-time visual feedback about where other users are focusing their attention, making it perfect for collaborative interfaces where awareness of others’ activity is important.
Perfect for: Collaborative design tools, document editing, form interactions, interactive tutorials, and any interface where showing user attention enhances the collaborative experience.

Basic Usage

Props

string
required
Unique identifier for this hoverable area. Users hovering over elements with the same key will trigger highlighting
React.ReactNode
required
The content to be wrapped and made hover-aware
string
Optional CSS class for styling the wrapper div
boolean
default:"false"
Whether to highlight when the local user hovers over the element (in addition to other users)

Examples

Document Editing Interface

Create hover highlights for different document sections:

Form Collaboration

Highlight form fields when users interact with them:

Design Tool Interface

Create hover highlights for design elements:

Interactive Tutorial

Guide users through tutorials with hover highlights:

Dashboard Widgets

Highlight dashboard widgets for collaborative review:

Card-Based Interface

Highlight cards in a collaborative interface:

Self-Highlighting Mode

Use highlightMyself to include your own hover interactions:

Nested Hover Highlighters

Create nested hover areas for complex interfaces:

Built-in Highlighting

The HoverHighlighter automatically applies these styles when users hover:

Customization

You can customize the highlighting with CSS:

Best Practices

Unique Keys

Meaningful Grouping

Performance Considerations

Accessibility

Common Patterns

  • Document Sections: Highlight different parts of collaborative documents
  • Form Fields: Show which form sections others are working on
  • Design Elements: Highlight UI components in design tools
  • Dashboard Widgets: Show attention on different dashboard sections
  • Tutorial Steps: Guide users through interactive tutorials
  • Card Interfaces: Highlight cards in collaborative boards
  • Cursors - Show mouse cursors for more detailed tracking
  • ConnectedUsers - Display who’s currently collaborating
  • Chat - Enable communication about highlighted content

TypeScript Support

The HoverHighlighter component is fully typed: