Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Image Hotspots

An image with pins that each open a small popover, for annotating a screenshot or photo.

ComponentsImage Hotspots
contentinteractive
<arc-image-hotspots>

Overview

Image Hotspots puts pins over a picture, and each pin opens a popover. Slot the image and the `<arc-hotspot>` children together. Each pin positions itself from its `x` and `y` attributes, given as percentages of the image, so source order doesn't matter and nothing is measured. Each pin is a `<button>` with a label and `aria-expanded`. Activating it opens its popover above the pin, and the popover flips and shifts to stay in the viewport. The parent keeps one popover open at a time. An open popover closes on Escape, on a click anywhere else, or on a second click of its pin. Every close goes through `close()`, including the parent's. It fires a cancelable `arc-close` first, and a listener that calls `preventDefault()` keeps the popover open. Closing the other popovers is itself a `close()` call, so a hotspot holding an unsaved note can refuse to close when someone clicks another pin, as well as on Escape. Call `close()` yourself to dismiss a popover from script. Its first argument, `restoreFocus`, defaults to true and returns focus to the pin. Pass `false` when you're closing one popover to open another, so focus lands on the new pin. Pins server-render at their coordinates because positioning is plain CSS from attributes. Only the popovers need JavaScript. Every hotspot fires `arc-open` and `arc-close`, which bubble to the parent with `detail.value` set to the hotspot's label, or its index if it has no label.

Guidelines

Do

  • Give every hotspot a label. It names the pin for screen readers, heads the popover, and identifies the hotspot in events
  • Keep popover content to a sentence or two, and link out for anything longer
  • Put each pin on the feature it describes, not beside it
  • Use a handful of pins per image
  • Give the component a width that keeps the pins far enough apart to tap

Don't

  • Don't put pins so close that their popovers cover each other's pins
  • Don't put critical information only in a popover. People miss pins
  • Don't use it for step-by-step onboarding. Pins have no order, and nothing here sequences them (`arc-guided-tour` was cut in v4, and `arc-tour` is the planned rebuild)

Features

  • Pins pulse, and their glow rises on hover and focus

Preview

Switch between projects without losing your place. Every workspace keeps its own layout. Each chart covers the last 30 days. Hover a line to see daily values. Download any panel as a CSV file or a PNG image.

Usage

Image Hotspots is in the marketing group, so the default @arclux/arc-ui entry point doesn't include it. Import it from@arclux/arc-ui/marketing or from its own subpath,@arclux/arc-ui/image-hotspots.

This component needs JavaScript. Use the Web Component or a framework wrapper.

<arc-image-hotspots>
  <img src="/screenshots/dashboard.png" alt="Analytics dashboard" />
  <arc-hotspot x="18" y="30" label="Navigation">
    Jump between reports, alerts, and settings from one rail.
  </arc-hotspot>
  <arc-hotspot x="60" y="45" label="Live charts">
    Metrics stream in real time — no refresh required.
  </arc-hotspot>
  <arc-hotspot x="85" y="78" label="Exports">
    Any panel exports to CSV, PNG, or a shared link.
  </arc-hotspot>
</arc-image-hotspots>

Hotspot

<arc-hotspot>

One pin inside Image Hotspots. `x` and `y` position it as percentages of the image, `label` names it, and its children become the popover body.

labelstring''
Accessible name for the pin button, repeated as the heading of the popover. Always set it: without a label the pin announces nothing useful to a screen reader.
xnumber50
Horizontal position of the pin as a percentage of the image width, from 0 (left edge) to 100 (right edge). Values outside the range are clamped; a non-numeric value falls back to 50.
ynumber50
Vertical position of the pin as a percentage of the image height, from 0 (top edge) to 100 (bottom edge). Values outside the range are clamped; a non-numeric value falls back to 50.
openbooleanfalse
Whether the pin's popover is currently visible. Reflected as an attribute. Opens on click; closes on Escape, outside click, or a second click on the pin.

Methods

close(restoreFocus?)restoreFocus?: boolean
Close the popover, firing the cancelable arc-close first, so a listener that calls preventDefault() keeps it open, whoever asked for the close. arc-image-hotspots calls this to enforce one-open-at-a-time, which is why a consumer's veto is honoured there too and not only on a manual close.

Events

arc-opendetail:{value: string | number}
Fired when the popover opens. detail.value carries the label, or the pin's index within its parent when no label is set.
arc-closedetail:{value: string | number}
Fired before the popover closes and cancelable: preventDefault() vetoes the close. detail.value matches arc-open.

See also