HotspotIndicator
Animated hotspot dot (outer ring + inner dot) for marking locations on images.
Positioned absolutely by percentage (centerX/centerY), so it needs a
positioned parent. Hover and active states are controlled by the parent via
hovered/active - the dot grows and the ring pulses in response.
Usage
Best practices
Place it inside a
position: relativeparent - it positions itself absolutely bycenterX/centerYpercentages, so it lands wrong in a static-flow container.State is parent-controlled: pass
hovered/active(plusonMouseEnter/onClick) - the dot grows and the ring pulses only in response; it tracks nothing itself.Always pass
label- it's the button'saria-labeland the hotspot's only accessible name; also mountReducedMotionProviderso the pulse honours the OS motion setting.
Props
Also exports
- interface
HotspotIndicatorProps
Composition
Builds on