Valyro Русская версия

Feature Hotspots

Numbered points on an image that open a note about each detail. Free, MIT · Interactive blocks › Interactive explainers

Numbered points over a picture: each opens a note about one detail. Points are shares of the source image, so they stay on their detail at any width, with contain letterboxing or cover cropping (cropped points stay in the list). Every point is also a row of the text list under the image, and the note returns focus where it was opened.

Installation

npx valyro-cli@latest add feature-hotspots
npx shadcn@latest add https://valyro.xyz/r/feature-hotspots.json
npm install valyro-ui

import 'valyro-ui/styles.css';
import { FeatureHotspots } from 'valyro-ui';

Props

PropTypeDefault
image *FeatureHotspotsImageThe picture and its text alternative.
hotspotsHotspot[][]Points with notes, in reading order (the Tab order). Ids must be unique; a repeated id is skipped.
fit'contain' | 'cover''contain'How the image fills the area: contain (default) shows all of it, cover fills it and may crop points away.
aspectRationumber | stringProportions of the image area (16 / 9). Default: the image's own (width / height), else 16 / 9.
activeIdstring | nullId of the open point, or null.
defaultActiveIdstring | nullnullInitial activeId when uncontrolled.
onActiveIdChange(id: string | null) => voidCalled with the new activeId when it changes.
mobilePresentation'sheet' | 'below''below'Where the note opens on a narrow block (under 560 px): a bottom sheet or a panel under the image. Default below.
showListbooleantrueThe text list of every detail under the image. Default true; it still shows when points are cropped away or the image fails.
marker'number' | 'dot''number'Marker look: the point's number (default) or a small dot. A point's icon wins over both.
pulsebooleanfalseA slow pulse on the markers; never under reduced motion. Default false.
labelsPartial<FeatureHotspotsLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

  • Exploded Layers — Prepared image layers pulled apart with captions
  • Prediction Card — The reader guesses first, then sees the answer and the explanation
  • Detail Dial — Choose how deep an explanation goes: short, detailed or full
  • Version Scrubber — Step through prepared versions of a design with one slider
  • Page Minimap — Schematic map of a long page with the visible area
  • Peel Sticker — A sticker you peel back by its corner to reveal what is under it
  • Scratch Reveal — Scratch off a cover to reveal text or a picture
  • Tear-off Ticket — A ticket whose stub tears off along the perforation
  • Split-Flap Board — Mechanical departure board: only the changed characters flip
  • Swipe Action Card — Swipe a card sideways to reveal its actions
  • Sticker Board — A free composition of photos, stickers and notes to move and rotate
  • Lasso Select — Drag a rectangle to select a group of cards

Previous: Donut Chart · Next: Exploded Layers · All Interactive blocks