ValyroUI English version

Feature Hotspots

Точки на изображении: нажатие открывает пояснение к детали. Бесплатно, MIT · Контент и соцсети › Интерактивные объяснения

Установка

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';

Пропсы

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.

Похожие компоненты

  • Exploded Layers — Подготовленные слои изображения раздвигаются с подписями
  • Prediction Card — Сначала предположение читателя, затем ответ и разбор
  • Detail Dial — Выбор глубины объяснения: кратко, подробно, полный разбор
  • Version Scrubber — Просмотр подготовленных версий одним ползунком
  • Page Minimap — Мини-карта длинной страницы с видимой областью
  • Article Header — Шапка статьи: рубрика, заголовок, лид, авторы и дата
  • Byline — Подпись: авторы, дата публикации и обновления, время чтения
  • Article Figure — Иллюстрация с подписью и автором фото
  • Pull Quote — Выносная цитата с атрибуцией
  • Key Points — Блок «Главное» с ключевыми тезисами
  • Editor Note — Обновление, исправление, раскрытие и пометка о спонсорстве
  • Article Toc — Оглавление статьи с подсветкой текущего раздела

Назад: Media Player · Далее: Exploded Layers · Весь раздел «Контент и соцсети»